New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hubot-es-logger

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hubot-es-logger

A plugin for Hubot to log channels activity on ElasticSearch, and serve logs via web.

0.2.4
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Hubot-es-logger

Version Downloads Build Status Dependency Status Coverage Status

This Hubot plugin enables various operations related to logging:

  • record all messages on configured channels to an ElasticSearch server
  • enable various commands to interact and query the logs
  • serve web pages to browse the logs
  • announce to users joining a channel where they can find the logs web page

If you only need to log to ElasticSearch, you can rather use hubot-elasticsearch-logger which only does that.

For low volume channel or for testing purpose, you can use the free service of Bonsai.io elasticsearch hosting.

Warning: This plugin is still in alpha stage. use with caution. It is designed to work fine with the hubot-irc adapter. Later on it will be tested on slack, gitter and others.

Install

In your hubot dir:

npm install hubot-es-logger --save

Then add to your external-scripts.json

[ 'hubot-es-logger' ]

Configuration

You will need to set various environment variables to get the logging configured

Variablerequireddefaultdescription
HUBOT_BASE_URLyesthe default url where your hubot web server can be reached. By default hubot launches express on port 8080
ES_LOG_ENABLEDno'false'useful to disable logging at bot start in dev env
ES_LOG_ANNOUNCEno'false'if set, will private message to people joining the channel, signaling the url where to browse the logs
ES_LOG_ES_URLyesthe url to your Elasticsearch server
ES_LOG_ROOMSyescomma-separated list of channels to log ie '#trolls,#another_channel,#third'
ES_LOG_INDEX_NAMEno'irclogs'name of the Elasticsearch index
ES_LOG_SINGLE_INDEXno'false'if 'true', it will use only one index, but by default, one index is created per day
ES_LOG_KIBANA_URLnoif you have a kibana access to your irc logs, it will be displayed on the web page
ES_LOG_KIBANA_TEMPLATEnothe template used in kibana (for building the url)

Web interface

Make sure you secure your web interface appropriately (with hubot-restrict-ip or putting hubot behind a proxy).

The web interface for now only shows the last 24 hours of discussion, but it will be configurable, searchable and navigable soon in next versions.

ToDo

  • test coverage (in progress)
  • log the bot (done 0.1.1)
  • log the join and part of users (done 0.1.1)
  • add an indication of logs enabled/disabled to the .logs command
  • improve error management for web part in case there is no index
  • add search features on web interface (done in 0.2.0)
  • add time navigation on web interface (done 0.1.2)
  • test with slack adapter
  • setup a backend pagination system in case of huge quantity of logs per day

Contribute

Feel free to open a PR if you find any bug, typo, want to improve documentation, or think about a new feature.

Gandi loves Free and Open Source Software. This project is used internally at Gandi but external contributions are very welcome.

Attribution

Authors

  • @mose - author and maintainer

License

This source code is available under MIT license.

Copyright (c) 2016 - Gandi - https://gandi.net

Keywords

hubot

FAQs

Package last updated on 08 Mar 2017

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