In /etc/monit/conf.d/splunk.monitrc (probably a new file) check program splunkd with path "/etc/monit/splunk_health. TEXT=`/opt/splunk/bin/splunk status 2>&1` In /etc/monit/splunk_health.sh (new file) #!/bin/bash Note - this does no alerting, and merely starts Splunk when it is detected down for two consecutive windows 5 minutes apart (you might have to tweak your settings if your global monit polling frequency is different).Īssuming you have the following setting in /etc/monitrc # Polling frequency So rather than using restart logic, just use a 'splunk start' to get it going again ('splunk start' is effectively a non-op if splunk is already running, as opposed to a stop-start). This can lead to ugliness if splunk was actually running. Secondly, monit tends to want to shut off the service prior to restarting it. Best off to use Splunk's own "splunk status" command, and exploit the fact that exit status carries some value (0 means it's running, other status mean it is not or there was an issue determining state). You can edit the configuration files with a text editor or modify them with the command line utility program uci. Each file relates roughly to the part of the system it configures. Monit will also let you know once the data usage falls below that level. OpenWrts central configuration is split into several files located in the /etc/config/ directory. That basically will send an email if the drive is more than 80 full. We also know that part of "normal" operation of Splunk can involve a restart (be it a rolling restart, a GUI invoked administrative restart after installing an app, etc). A typical disk check stanza would look like: check device var with path /var if SPACE usage > 80 then alert. We want to do away with pid checking and port checking, this often leads to confusion as pids can be somewhat fluid with Splunk. Here's some pointers for a "real world" Splunk process monitor in Monit, that will restart splunk when it is detected down by 'splunk status'.įirst off, we want to get better downtime detection.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |