Sorry if this has been asked and answered, but I couldn't find anything in a search.
Is it possible to alert on the status of the cluster?
We recently had our system hit a critical state and didn't know about it until we needed logs that weren't being collected.
I'd like to have an alert sent out via email when the cluster status is yellow or red if it all possible.
Alert on Cluster Status
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Alert on Cluster Status
This cannot be done from within Log Server.
Are you also using Nagios XI or Core for monitoring?
You could create a plugin for XI or Core that did the following (replacing SERVER_ADDRESS and APIKEY:
Are you also using Nagios XI or Core for monitoring?
You could create a plugin for XI or Core that did the following (replacing SERVER_ADDRESS and APIKEY:
Code: Select all
#!/bin/bash
status=$(curl --silent "http://SERVER_ADDRESS/nagioslogserver/api/backend/_cat/health?v&token=APIKEY"|tail -1 |awk '{ print $4 }')
echo "Status is $status"
if [ "$status" == "green" ]; then
exit 0
else
exit 2
fi