Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

log-to-slack

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

log-to-slack

Parse logs on remote servers and post new messages to Slack

  • 1.3.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Log to Slack

Loads and parses logs from remote servers over SSH and sends new messages to a specified Slack channel

Dependency Status devDependency Status

Installing

npm install -g log-to-slack
cp /path/to/node/install/config/example.json /path/to/node/install/config/default.json
vim /path/to/node/install/config/default.json
log-to-slack

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

The config file needs all the following settings

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

Available modules

Apache2 error logs
Apache2 access logs (4xx & 5xx)

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

"lineCount": 50000

Default: 500000

skipFiles: Array of filenames to match and skip if found. Example

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

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

"skipCodes": [
    408
]

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",
            "username": "username",
            "password": "password",
            "services": {
                "apache2": true
            }
        },
        {
            "host": "54.175.129.157",
            "username": "anotheruser",
            "password": "anotherpassword",
            "services": {
                "apache2": true,
                "apache2Access": {
                    "skipCodes": [
                        408
                    ],
                    "skipFiles": [
                        "favicon.ico",
                        "robots.txt"
                    ],
                    "lineCount": 50000
                }
            }
        }
    ]
}

FAQs

Package last updated on 01 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc