Skip to content
nickanderson edited this page Sep 14, 2010 · 2 revisions

Collects performance data from sar and returns in NRPE format.

http://nagiosplug.sourceforge.net/developer-guidelines.html

Written for use with Zenoss as a command based data source.

Install NRPE
==

sudo -u nagios /usr/lib/nagios/plugins/check_nrpe -H remote-host -c check_sar_perf.py

Create template under Devices/Server to use the script
============

(You can create template under any scope e.g Devices/Server/linux)
Classes→Devices→Server(sub-Devices)Templates→Add Template (add template is hidden drop down menu brought up by clicking the small triangle button)
New data Source ( ID: userdefined–NRPE TYPE: command)

NAME:nrpe_check_sar_perf_cpu Enabled:true use ssh :false Event Class:/cmd/fail Severity:error Command Template: /usr/lib/nagios/plugins/check_nrpe -H ${here/manageIp} -c check_sar_perf cpu

Add data points you want each label (label=value) in the output is available for use. Once defined as a data-source Zenoss will start tracking them.
Note: how you implement the template may vary on how your nrpe agent is compiled. If your agent allows passing variables when called that may be significantly less work. I just added a data source for each type of sar output and passed the proper profile to sar.

Bind the template to your Device
======
Device List→yourdevice→Open→
Click the small triangle button→More→Template
Click the small triangle button→Bind Templates→add new template to selection (You can select multiple templates)

Test
====
/opt/zenoss/zenoss/bin/zencommand run -d 10.248.248.22 -v10
The output show you zencommand found the new script and executed it.
Back to GUI, the alarm should appear in event log of the device.

Clone this wiki locally