npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

logentries-migrator

v1.2.0

Published

Import-export tags and alerts from Logentries

Downloads

13

Readme

logentries-migrator

Import-export tags and alerts from a Logentries account to an other.

##Features

  • export tags and alerts from an account into a file
  • import tags and alerts into an account from a file or an other account
  • skip the demo tags
  • change alert target emails on import
  • change alert rate and report settings on import
  • attach tags and alerts to a log or to a whole logset
  • prevent tag duplication (if there is one with the same name)
  • bundled with default alert and log settings for Heroku

Usage

The migrator requires a working NodeJS >= 4 environment and an NPM install.

npm install -g logentries-migrator

All migration commands need an account id which you can find in the Logentries UI Account settings / Profile / Account key.

To migrate a Logentries account from Heroku you could use this guide.

Export

You can export alerts and tags from an account in json format. It could be used as a backup or a source for importing later.

logentries-migrator export --account_key 11111111-2222-3333-4444-555555555555 --output output.json

Arguments

--account_key  Account key to get the data from [required]
--output       Filename to export the data      [required]
--help         Show help

Import

You can import alerts and tags from an account directly or from a previously saved json file. You can also save the exported settings to a file without using the export command explicitly.

logentries-migrator import --account_key 11111111-2222-3333-4444-555555555555 --target_account_key 91111111-2222-3333-4444-555555555555 --log_set 'Sample logset' --log 'Sample logs' --alert_emails '[email protected]' --alert_rate_count 11 --alert_rate_range 'hour' --alert_limit_count 22 --alert_limit_range 'hour' --output 'backup.json'

Arguments

--account_key         Account key to get the data from. This or the input
                      argument should be provided!
--output              Filename to dump the exported data to later use
--input               Filename for import the data from. This or the
                      account_key argument should be provided!
--target_account_key  The account key to import the data [required]
--log_set             Add the alerts to the logs of the specified log set
--log                 Add the alerts to a log. The log_set argument should be
                      provided to use this option!
--alert_emails        Set the direct mail alerts to the specified email
                      instead of the exported one. It could contain multiple
                      emails, eg. '[email protected],[email protected]'
--alert_rate_count    Override the exported alert rate count
--alert_rate_range    Override the exported alert rate range [choices: "day", "hour"]
--alert_limit_count   Override the exported alert limit count
--alert_limit_range   Override the exported alert limit range [choices: "day", "hour"]

Import default Heroku tags & alerts

For a new Heroku app it's good to have predefined alerts and tags for the Heroku error codes. You can find a heroku-defaults.json in the repository root which contains default settings for all of these. If you are importing these defaults make sure that you provided an email address otherwise there will be e-mail alerts to a not existing mailbox.

logentries-migrator import --input heroku-defaults.json --alert_emails "EMAIL_FOR_ALERTS" --log_set "YOUR_LOG_SET" --target_account_key YOUR_ACCOUNT_ID