Home Directory Plugins Others Check_SHOUTCast_v2

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Check_SHOUTCast_v2

Rating
0 votes
Favoured:
0
Current Version
0.2.0
Last Release Date
2017-12-07
Compatible With
  • Nagios 4.x
Owner
Twitter Handle
@keijodputt
Hits
3400
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Check_SHOUTCast_v2
** Check SHOUTCast v2 + stream + listeners **
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!