All Projects → blue-yonder → bonfire

blue-yonder / bonfire

Licence: BSD-3-Clause license
A CLI Graylog Client with Follow Mode

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to bonfire

Documentation
Stars: ✭ 133 (+84.72%)
Mutual labels:  graylog
Kickoff Docker Php
🐳 🐘 🚀 Easily setup a PHP project with Docker
Stars: ✭ 213 (+195.83%)
Mutual labels:  graylog
graylog-plugin-oauth2
Oauth2 plugin for graylog project
Stars: ✭ 16 (-77.78%)
Mutual labels:  graylog
Logback Gelf
Logback appender for sending GELF messages with zero additional dependencies.
Stars: ✭ 146 (+102.78%)
Mutual labels:  graylog
Collector Sidecar
Manage log collectors through Graylog
Stars: ✭ 209 (+190.28%)
Mutual labels:  graylog
Icinga Vagrant
Vagrant boxes for Icinga 2, Icinga Web 2, modules, themes and integrations (Graphite, InfluxDB, Elastic, Graylog, etc.)
Stars: ✭ 248 (+244.44%)
Mutual labels:  graylog
Icinga2
Icinga is a monitoring system which checks the availability of your network resources, notifies users of outages, and generates performance data for reporting.
Stars: ✭ 1,670 (+2219.44%)
Mutual labels:  graylog
graylog-plugin-netflow
[DEPRECATED] Graylog NetFlow plugin
Stars: ✭ 35 (-51.39%)
Mutual labels:  graylog
Graypy
Python logging handler for Graylog that sends messages in GELF (Graylog Extended Log Format).
Stars: ✭ 211 (+193.06%)
Mutual labels:  graylog
graylog-plugin-pipeline-processor
[DEPRECATED] Graylog Pipeline Message Processor Plugins
Stars: ✭ 21 (-70.83%)
Mutual labels:  graylog
Logrus mate
tool for logrus, let it easy to use
Stars: ✭ 148 (+105.56%)
Mutual labels:  graylog
Graylog Docker
Official Graylog Docker image
Stars: ✭ 200 (+177.78%)
Mutual labels:  graylog
Graylog-Plugin-AlertManager-Callback
A plugin for Graylog which provides the possibility to send alerts to the Prometheus AlertManager API.
Stars: ✭ 23 (-68.06%)
Mutual labels:  graylog
Quicklogger
Library for logging on files, console, memory, email, rest, eventlog, syslog, slack, telegram, redis, logstash, elasticsearch, influxdb, graylog, Sentry, Twilio, ide debug messages and throw events for Delphi/Firemonkey/freepascal/.NET (Windows/Linux/OSX/IOS/Android).
Stars: ✭ 137 (+90.28%)
Mutual labels:  graylog
terraform-provider-graylog
Terraform Provider for Graylog
Stars: ✭ 21 (-70.83%)
Mutual labels:  graylog
Graylog Plugin Threatintel
Graylog Processing Pipeline functions to enrich log messages with IoC information from threat intelligence databases
Stars: ✭ 132 (+83.33%)
Mutual labels:  graylog
Graylog2 Images
Ready to run machine images
Stars: ✭ 234 (+225%)
Mutual labels:  graylog
NLog.Targets.GraylogHttp
NLog target that pushes log messages to Graylog using the Http input.
Stars: ✭ 17 (-76.39%)
Mutual labels:  graylog
graylog-plugin-collector
Collector plugin for Graylog
Stars: ✭ 13 (-81.94%)
Mutual labels:  graylog
logback-gelf-appender
Logback appender that sends GELF messages
Stars: ✭ 38 (-47.22%)
Mutual labels:  graylog

bonfire

Bonfire is a command line interface to query Graylog searches via the REST API. It tries to emulate the feeling of using tail on a local file.

Usage

Examples:

> bonfire -h logserver -u jdoe -@ "10 minutes ago" "*"
...

> bonfire -h logserver -u jdoe -f "source:localhost AND level:2"
...

Bonfire usage:

Usage: bonfire [OPTIONS] [QUERY]

  Bonfire - An interactive graylog cli client

Options:
  --node TEXT                     Label of a preconfigured graylog node
  -h, --host TEXT                 Your graylog node's host
  -s, --tls                       Use HTTPS
  --port INTEGER                  Your graylog port (default: 12900)
  --endpoint TEXT                 Your graylog API endpoint e.g /api (default:
                                  /)
  -u, --username TEXT             Your graylog username
  -p, --password TEXT             Your graylog password (default: prompt)
  -k, --keyring / -nk, --no-keyring
                                  Use keyring to store/retrieve password
  -@, --search-from TEXT          Query range from
  -#, --search-to TEXT            Query range to (default: now)
  -t, --tail                      Show the last n lines for the query
                                  (default)
  -d, --dump                      Print the query result as a csv
  -f, --follow                    Poll the logging server for new logs
                                  matching the query (sets search from to now,
                                  limit to None)
  -l, --interval INTEGER          Polling interval in ms (default: 1000)
  -n, --limit INTEGER             Limit the number of results (default: 10)
  -a, --latency INTEGER           Latency of polling queries (default: 2)
  -r, --stream TEXT               Stream ID of the stream to query (default:
                                  no stream filter)
  -e, --field TEXT                Fields to include in the query result
  -x, --template-option TEXT      Template options for the stored query
  -s, --sort TEXT                 Field used for sorting (default: timestamp)
  --asc / --desc                  Sort ascending / descending
  --help                          Show this message and exit.

Configuration

Bonfire can be configured. It will look for a ~/.bonfire.cfg or a bonfire.cfg (in the current directory). The configuration file can specify API nodes. If no host is specified a node with the name default will be used. You can also configure queries which can be referenced by starting your query with a colon:

[node:default]
host=1.2.3.4
port=12900
endpoint=/
username=jdoe

[node:dev]
host=4.3.2.1
port=9000
endpoint=/api
username=jdoe
password=H4rrH4rrB0bba

[query:example]
query=facility:*foo* AND source:*bar*
from=2015-03-01 15:00:00
limit=100
fields=message,name,facility,source

Now you can run queries via such as:

> bonfire --node=dev :example
... runs the example query on the node dev

> bonfire :example
... runs the example query on the default node

Query Templates

Options

Queries

Testing

Cf. the travis script for running tests. Make sure you disable proxies / set noproxy if you're using a proxy, to be able to reach the test dummy server (called dummyserver), e.g.:

> env no_proxy=dummyhost python setup.py test

Known Bugs

Development

Once you want to release a new version, do the following:

  • bring your git tree in order, cut the release, and tag it with the desired version
  • install necessary pip packages: > python3 -m pip install –-user –-upgrade setuptools wheel twine
  • bundle your release: > python3 setup.py sdist bdist_wheel
  • publish it: > python3 -m twine upload dist/*

Note that if you have several different versions in dist, you might want to specify which one you want to publish.

Release Notes

  • v0.0.7: Issues fixes, TLS and Proxy support
    • Adds support for proxies
    • Adds support for https urls
    • Add timestamps to the dump format
  • v0.0.6: Documentation fix
    • Change of README.rst
  • v0.0.5: Clean up
    • Removed terminal UI ideas
    • Added first tests
    • Fixed date and time handling with timezones
    • Added python3 compatibility
  • v0.0.4: Extended documentation & stream access
    • Use the first stream the user has access to if no stream is specified and the user has no global search rights
  • v0.0.3: Small fixes
    • Use accept header in GET requests.
    • Fix bug when querying specific fields
  • v0.0.1: Initial release
    • Limited feature set.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].