When I add services-wrapper.py to Cron All Polling stops

I have been screwing with setting up nagios plugins I followed this article

Service checks in LibreNMS

To do some basic http checking. Everything seems to work normally untill I get to adding the cron job

*/5  *    * * *   librenms    /opt/librenms/services-wrapper.py 1

After adding the line to the

/etc/cron.d/librenms

All of my polling stops.

There is nothing in the error or librenms log.
Thanks for your help.

What doc did you follow? That link didn’t seem to work.

https://raymii.org/s/tutorials/Service_checks_in_LibreNMS_nagios_plugins.html
This is the url.

Sounds like you made an error in your cron file.

Any Idea Where, this is my Cron file with the service commented out it is running normally with the line commented.

# Using this cron file requires an additional user on your system, please see install docs.

33  */6   * * *   librenms    /opt/librenms/discovery-wrapper.py 8 >> /dev/null 2>&1
*/5  *    * * *   librenms    /opt/librenms/discovery.php -h new >> /dev/null 2>&1
*/2  *    * * *   librenms    /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16
15   0    * * *   librenms    /opt/librenms/daily.sh >> /dev/null 2>&1
*    *    * * *   librenms    /opt/librenms/alerts.php >> /dev/null 2>&1
# */5  *    * * *   librenms    /opt/librenms/html/plugins/Weathermap/map-poller.php >> /dev/null 2>&1
# */5  *    * * *   librenms    /opt/librenms/services-wrapper.py 1

Would the frequency need to match the poller-wrapper.py?

So in my cron file I moved the service-poller.ph under poller-wrapper.py and set the interval to 2 min and it seems to be working so far. Not sure why though.

# Using this cron file requires an additional user on your system, please see install docs.

33  */6   * * *   librenms    /opt/librenms/discovery-wrapper.py 8 >> /dev/null 2>&1
*/5  *    * * *   librenms    /opt/librenms/discovery.php -h new >> /dev/null 2>&1
*/2  *    * * *   librenms    /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16
*/2  *    * * *   librenms    /opt/librenms/services-wrapper.py 8
15   0    * * *   librenms    /opt/librenms/daily.sh >> /dev/null 2>&1
*    *    * * *   librenms    /opt/librenms/alerts.php >> /dev/null 2>&1
# */5  *    * * *   librenms    /opt/librenms/html/plugins/Weathermap/map-poller.php >> /dev/null 2>&1

Any one know where to find Parameters for the nagios plugins?

Don’t change the cron to two minutes, you are wasting resources. The RRD files discard any data not on a 5 minute interval.

You can check monitoring plugin parameters by running them on the cli with the -h switch.

1 Like

I recommend you use this doc https://docs.librenms.org/Extensions/Services/

1 Like