About Nagios Planet

Nagios Planet is an aggregation of news feeds from around the Nagios world. This site is maintained in cooperation with OpenXtra. Learn more...

Planet Feed

Nagios Planet Feed

Welcome To Nagios Planet

planet-worldlogoWelcome to Nagios Planet!  Nagios Planet is an aggregation of various Nagios news feeds. Want a quick and easy way to catch up on the latest Nagios news from the entire collective? It's easy - just subscribe to the Nagios Planet feed.

Have a blog or news feed about Nagios that you'd like to see included here? Email planet@nagios.org

Nagios Planet Latest News

  • Nagios to sponsor MISC.conf and OSCON conferences in Minnesota and Texas 2 May 2016 | 2:00 pm Nagios Planet - Feed Archives

    Nagios is hitting the road this spring to attend and sponsor two conferences, locally and nationally. The first stop is at MISC.conf, located in St. Paul, Minn. from May 14-15, 2016. The conference, hosted by Minnesota Information Security Community Inc., … Read More

    The post Nagios to sponsor MISC.conf and OSCON conferences in Minnesota and Texas appeared first on Nagios.

    Read more: https://www.nagios.org/news/2016/05/misc-oscon-conference-sponsors/

  • Veeam Endpoint Backup Check - Via Event Logs 2 May 2016 | 10:38 am Nagios Planet - Feed Archives

    Check_veeam_endpoint_eventlogs is a PowerShell script to check if Veeam Endpoint jobs ran properly. If you have the full-blown version of Veeam, please use the check_veeam_eventlogs script instead as it allows for job names. Note: This uses built-in Windows event logs to check for Veeam backup codes and it does *not* utilize the Veeam PowerShell snap-in because I had far too many issues on far too many systems. Yes, I also realize Veeam has the built-in capability to email, but that doesn't scale well with any significant number of machines. And if you choose to only send email on failure, what happens if email isn't working -- spam blocks, authentication failures, etc? Too many possibilities to assume email notifications are even remotely reliable and Nagios is able to consolidate all alerts to a central location. I have tested this extensively using NCPA, although NRPE and other agents would likely work. If you have issues with it, please let me know and I will make changes as necessary. The script is heavily commented and very readable with numerous usage examples in the script itself. Enjoy!

    Read more: https://exchange.nagios.org/directory/Plugins/Backup-and-Recovery/Veeam-Endpoint-Backup-Check--2D-Via-Event-Logs/details

  • Asterisk Fax Statistics 2 May 2016 | 10:37 am Nagios Planet - Feed Archives

    This is a passive Nagios plugin to gather the fax statistics for Asterisk systems. This package contains plugin versions for both the Spandsp and Digium FFA ( Fax for Asterisk ) modules.

    Read more: https://exchange.nagios.org/directory/Plugins/Telephony/Asterisk/Asterisk-Fax-Statistics/details

  • Check 3Gstore Remote Power Outlet 2 May 2016 | 10:36 am Nagios Planet - Feed Archives

    Do you have a 3Gstore 2 Outlet Remote Power Switch? Monitor it with Nagios! You can also turn outlets on, or off; toggle their current state; or reset. A must have if you have remote devices that you want to automatically power cycle if they become unresponsive!!

    Read more: https://exchange.nagios.org/directory/Plugins/Hardware/UPS/Others/Check-3Gstore-Remote-Power-Outlet/details

  • check_snmp_firecluster 28 Apr 2016 | 10:43 am Nagios Planet - Feed Archives

    This plugin monitors the health and status of your Watchguard XTM Firebox Cluster (Firecluster). It relies on SNMP being enabled on your firebox. V1/2 and V3 supported. All auth/priv levels supported.

    Read more: https://exchange.nagios.org/directory/Plugins/Hardware/Network-Gear/Others/check_snmp_firecluster/details

  • check_md5_sums 27 Apr 2016 | 1:41 pm Nagios Planet - Feed Archives

    NRPE Plugin to perform an integrity check on files, or groups of files. Purpose: Other plugins exist to check file md5sums, I wanted the ability to easily test against multiple groups of files, or test individual files.

    Read more: https://exchange.nagios.org/directory/Plugins/Others/check_md5_sums/details

  • check_overlandstorage 26 Apr 2016 | 4:45 am Nagios Planet - Feed Archives

    Nagios plugin for Overland Storage SnapServer N2000 and others

    Read more: https://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/SAN-and-NAS/check_overlandstorage/details

  • Extending Nagios functionality with libnagios 25 Apr 2016 | 7:14 pm Nagios Planet - Feed Archives

    Have you ever attempted to write a function in C to execute a command and parse the output? I think I’d rather just let the Nagios library do the heavy lifting for me.

    This blog post is going to cover the basics of compiling libnagios, and linking the Nagios library to your application. I’ll be focusing on using some of the built-in Nagios functionality, specifically the runcmd_open() function.

    I’m going to assume you have a sane build environment set up (where tools like make and ./configure are working) before we go any further. If you are following along, now would be the time to get these in order.

    First, download the source code and extract it. You can get a copy of the Nagios Core source at https://github.com/NagiosEnterprises/nagioscore/archive/master.zip. Once you’ve downloaded it and extracted the files, open up nagioscore-master/lib/runcmd.h (https://github.com/NagiosEnterprises/nagioscore/blob/master/lib/runcmd.h). Search for “extern int runcmd_open”, as of the time of this writing, that should bring you to line 77, where our function is declared:

    /** * Start a command from a command string * @param[in] cmd The command to launch * @param[out] pfd Child's stdout filedescriptor * @param[out] pfderr Child's stderr filedescriptor * @param[in] env Currently ignored for portability * @param[in] iobreg The callback function to register the iobrokers for the read ends of the pipe * @param[in] iobregarg The "arg" value to pass to iobroker_register() */ extern int runcmd_open(const char *cmd, int *pfd, int *pfderr, char **env, void (*iobreg)(int, int, void *), void *iobregarg) __attribute__((__nonnull__(1, 2, 3, 5, 6)));

     

    So what does all that mean? It means we need a command to execute, a file descriptor for stdout, another filedescriptor for stderr. Our application doesn’t need a callback function to register iobrokers or a value to pass. But, since these are declared non null, we’ll have to get creative.

    Let’s create a file, named test.c in the root of the nagioscore-master directory. First, we need to include our libnagios header.

    #include "lib/libnagios.h"

     

    Then we define our fake iobroker_register function. This is essentially just a placeholder, as we aren’t (yet) particularly interested in assigning a function to execute when our stdout/stderr stops reading.

    /* define a fake iobroker_register function for the libnagios call */ static void fake_iobreg(int fdout, int fderr, void *arg) { }

     

    Next, we set up our variables that we’ll be using to pass to the runcmd_open() function. We don’t need an env variable, since that argument can accept a NULL value, we’re just going to pass that in (especially since it is unused anyway).

    int main(void) { /* set up the vars */ int BUFFER = 128; char *cmd; int pfd[2] = {-1, -1}; int pfderr[2] = {-1, -1}; int fake_iobregarg = 0; int fd; char *out = calloc(1, BUFFER); /* lets keep this simple for now */ asprintf(&cmd, "echo hello");

     

    Now we execute runcmd_open(), and let the Nagios library do its magic! This will put stdout in pfd[0] and stderr in pfderr[0].

    /* run the command */ fd = runcmd_open(cmd, pfd, pfderr, NULL, fake_iobreg, &fake_iobregarg);

     

    Let’s copy the stdout to our out var and print some information relating to the command we executed and that command’s output.

    /* get the output from the stdout file descriptor into the out var */ read(pfd[0], out, BUFFER); /* output our information */ printf("The command we're executing is: %s\n", cmd); printf("The output of the command is: %s\n", out);

     

    Finally, we clean up our memory and exit the program.

    /* house-keeping */ free(cmd); free(out); close(pfd[0]); close(pfderr[0]); close(fd); return 0; }

     

    Here’s the file in its entirety:

    test.c

    #include "../lib/libnagios.h" /* define a fake iobroker_register function for the libnagios call */ static void fake_iobreg(int fdout, int fderr, void *arg) { } int main(void) { /* set up the vars */ int BUFFER = 128; char *cmd; int pfd[2] = {-1, -1}; int pfderr[2] = {-1, -1}; int fake_iobregarg = 0; int fd; char *out = calloc(1, BUFFER); /* lets keep this simple for now */ asprintf(&cmd, "echo hello"); /* run the command */ fd = runcmd_open(cmd, pfd, pfderr, NULL, fake_iobreg, &fake_iobregarg); /* get the output from the stdout file descriptor into the out var */ read(pfd[0], out, BUFFER); /* output our information */ printf("The command we're executing is: %s\n", cmd); printf("The output of the command is: %s\n", out); /* house-keeping */ free(cmd); free(out); close(pfd[0]); close(pfderr[0]); close(fd); return 0; }

     

    Let’s see it in action! First we’re going to compile our Nagios library! Open up your terminal and let’s get to library compilin’:

    cd /path/to/nagioscore-master ./configure make lib/libnagios.a make install-lib

     

    Those commands should have compiled your Nagios library and then placed it in /usr/local/nagios/lib. Now, we’re finally ready to compile our program:

    gcc -L/usr/local/nagios/lib test.c -lnagios -o test

     

    Now, if everything went well up this point, you should be able to execute our basic program with the following command:

    ./test

    Your output should be similar to the following:

    # ./test The command we're executing is: echo hello The output of the command is: hello #

    I hope that you’ve learned a few things about using the Nagios library in your own code. Questions, comments, and suggestions for future posts are all welcome below in the comments section.

     

    – Bryan Heden

    Read more: https://labs.nagios.com/2016/04/25/extending-nagios-functionality-with-libnagios/

  • check_iei_ups 21 Apr 2016 | 10:44 am Nagios Planet - Feed Archives

    A script used by NSClient++ to check the status of an iEi Technology Corp. AUPS series VESA Mount Intelligent UPS Module.

    Read more: https://exchange.nagios.org/directory/Plugins/Hardware/UPS/Others/check_iei_ups/details

  • check_ohm_temperatures 21 Apr 2016 | 10:42 am Nagios Planet - Feed Archives

    A PowerShell script used by NSClient++ to check the temperatures on a host running Windows. NSClient++ can then be called by Nagios to run this script. The script uses OpenHardwareMonitor.org to read the temperatures.

    Read more: https://exchange.nagios.org/directory/Plugins/System-Metrics/Environmental/check_ohm_temperatures/details