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

log-to-slack

v2.0.4

Published

Parse logs on remote servers and post some of them Slack

Downloads

50

Readme

Log to Slack

Loads and parses logs from remote servers over SSH and sends some of them to a specified Slack channel

Dependency Status devDependency Status

Installing

npm install -g log-to-slack
log-to-slack --config path/to/config.json

If you are on ubuntu you might need to symlink node to nodejs http://stackoverflow.com/a/18130296/1223319

sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10

Available options

Command line

--debug Run in debug mode

  • Disables posting to Slack
  • Outputs more stuff in the console

Config file

host What host to use for the connection
port What port to use for the connection
username What username to use when connecting
password What password to use when connecting

Example config file

Available modules

Apache2 error logs

skipStrings: Array of strings to match and skip if found.

Example

"skipStrings": [
    "robots.txt",
    "favicon.ico"
]

Default: []

useVulnList: Use web-vuln-scan-list to exclude common paths used by vulnerability scanners from showing up as errors.

Example

"useVulnList": false

Default: true

Apache2 access logs (4xx & 5xx)

lineCount: The number of lines to lookback when parsing the log.

Example

"lineCount": 50000

Default: 500000

skipStrings: Array of strings to match and skip if found.

Example

"skipStrings": [
    "robots.txt",
    "favicon.ico"
]

Default: []

skipCodes: Array of response codes that we shouldn't report.

Example

"skipCodes": [
    408
]

Default: []

useVulnList: Use web-vuln-scan-list to exclude common paths used by vulnerability scanners from showing up as errors.

Example

"useVulnList": false

Default: true

Symfony logs

path: The path to the log file.

Example

"path": "/my/path/to/my/prod.log"

Default: ""

skipStrings: Array of strings to match and skip if found.

Example

"skipStrings": [
    "robots.txt",
    "favicon.ico"
]

Default: []

useVulnList: Use web-vuln-scan-list to exclude common paths used by vulnerability scanners from showing up as errors.

Example

"useVulnList": false

Default: true

nginx error logs

skipStrings: Array of strings to match and skip if found.

Example

"skipStrings": [
    "robots.txt",
    "favicon.ico"
]

Default: []

useVulnList: Use web-vuln-scan-list to exclude common paths used by vulnerability scanners from showing up as errors.

Example

"useVulnList": false

Default: true

Example config

{
    "slackApiToken": "my-slack-api-key",

    "slackChannel": "#syslog",
    "slackUsername": "Logan",
    "slackIconUrl": "http://i.imgur.com/JKDkKU0.png",

    "checkInterval": 30000,

    "servers": [
        {
            "host": "myserver.myhost.com",
            "port": "myport",
            "username": "username",
            "password": "password",
            "services": {
                "apache2": true,
                "symfony": {
                    "path": "/path/to/my/prod.log"
                }
            }
        },
        {
            "host": "54.175.129.157",
            "username": "anotheruser",
            "password": "anotherpassword",
            "services": {
                "apache2": true,
                "apache2Access": {
                    "skipCodes": [
                        408
                    ],
                    "skipStrings": [
                        "favicon.ico",
                        "robots.txt"
                    ],
                    "lineCount": 50000
                }
            }
        }
    ]
}