Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Check_SHOUTCast_v2
0.2.0
2017-12-07
- Nagios 4.x
@keijodputt
4793
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
A Simple Nagios plugin for SHOUTCast, written in bash.
This Nagios plugin will query a target SHOUTCast v2 server on the specified port for response, source connected and listeners (total/max/peak) at scheduled times. Thresholds can be configured within the script and/or parsed from the service declaration within each host. For the plugin to function properly, we'll need curl and xml2.
DISCLAIMER: All info is provided "AS-IS", it's intended to fit my own purpose, and any unwanted consequences on your environment is your responsibility. You can take this, touch it, modify it, and make it work in your own setup without any guarantee that it will even work. If it does, awesome, but if it doesn't, well, you're on your own.
** Check SHOUTCast v2 + stream + listeners **
A Simple Nagios plugin for SHOUTCast, written in bash.
Based on the work by Juliano Jeziorny (djkadu), this adaptation aims to SHOUTCast v2.x for which the original didn't provide support. Since the script queries and parses the stats xml for its data, no user/pass for the SHOUTCast admin panel is needed.
TESTED ON:
Nagios: Core 4.3.4
OS: Centos 7.3
~~~~
USAGE:
Open the plugin file and read through its contents to get a glimpse of what it does and how to adjust its 'hardcoded' settings.
Copy the script (modified by you) onto your $USER1$ directory (usually /usr/local/nagios/libexec)
Grant it executable status (chmod a+x) and allow the nagios user/group to be the owner (chown)
Append the following command to your commands.cfg declaration (change -p XXXX to suit your setup) and save:
# Check SHOUTCast V2 specific command:
define command{
command_name check-shoutcast-v2-XXXX
command_line /usr/local/nagios/libexec/check_shoutcast_v2 -H $HOSTADDRESS$ -p XXXX
}
Append the following service to each of your target hosts cfg (replace target-host with your data and XXXX with your command setup), then save:
# Check SHOUTCast V2 specific service:
define service {
use generic-service
host_name target-host
service_description SHOUTcast
check_command check-shoutcast-v2-XXXX
}
Pre-flight check:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
If it looks okay, issue a restart.
Good luck!
A Simple Nagios plugin for SHOUTCast, written in bash.
Based on the work by Juliano Jeziorny (djkadu), this adaptation aims to SHOUTCast v2.x for which the original didn't provide support. Since the script queries and parses the stats xml for its data, no user/pass for the SHOUTCast admin panel is needed.
TESTED ON:
Nagios: Core 4.3.4
OS: Centos 7.3
~~~~
USAGE:
Open the plugin file and read through its contents to get a glimpse of what it does and how to adjust its 'hardcoded' settings.
Copy the script (modified by you) onto your $USER1$ directory (usually /usr/local/nagios/libexec)
Grant it executable status (chmod a+x) and allow the nagios user/group to be the owner (chown)
Append the following command to your commands.cfg declaration (change -p XXXX to suit your setup) and save:
# Check SHOUTCast V2 specific command:
define command{
command_name check-shoutcast-v2-XXXX
command_line /usr/local/nagios/libexec/check_shoutcast_v2 -H $HOSTADDRESS$ -p XXXX
}
Append the following service to each of your target hosts cfg (replace target-host with your data and XXXX with your command setup), then save:
# Check SHOUTCast V2 specific service:
define service {
use generic-service
host_name target-host
service_description SHOUTcast
check_command check-shoutcast-v2-XXXX
}
Pre-flight check:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
If it looks okay, issue a restart.
Good luck!
Reviews (0)
Be the first to review this listing!