-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Denis Immoos edited this page May 20, 2016
·
9 revisions
- Sys::Syslog
- DateTime
- LWP::UserAgent
- HTTP::Request
- JSON
# ./check_graylog_hits.pl -H hostname --minutes 30 --warning 20 --critical 40 --json-file templates/sshd_anomalies.json
You can place other .json files inside the templates/ directory.
The hostname the script will lookup messages for. This is not necessarily the graylog server.
The graylog server is configured with the $Options{'graylog_ip'} inside the check_graylog_hits.pl script.
This parameter defines how many minutes from now the script will go back in time to look for saved messages in graylog.
It will print out a warning or a critical if the defined numbers of hits are reached.
The JSON-File is fetched from graylog.
In this example it will look for the following:
sshd AND ( message:failed OR message:disconnecting )