Nagios Plugin via CLI

I’m guessing @farhan wants a text list of all the command lines of the 630 nagios checks.

If you want a listing of all the Nagios rules, just go to Setup > Services > Other services > Integrate Nagios plugins. You will get listings per host folder.

When the command line doesn’t begin with a path, it runs a check from folders @Dirk mentioned. Otherwise a path is shown.

If you want those listings offline as text for analysis, or whatever, you can use a browser extension like Table Capture for Firefox, Chrome and Edge to copy tables as tab seperated data to clipboard.

A table like:
image

Can be copied with that browser extension to get something like this:

Actions	Conditions	Value	Description
		No conditions	Service description: SNMP Kyocera Model  <> Command line: check_snmp -H $HOSTADDRESS$  -o 1.3.6.1.2.1.25.3.2.1.3.1 -P 2c -C public	SNMP Kyocera Model
		No conditions	Service description: SNMP Kyocera Serial  <> Command line: check_snmp -H $HOSTADDRESS$  -o 1.3.6.1.4.1.1347.43.5.1.1.28.1 -P 2c -C public	SNMP Kyocera Serial
		No conditions	Service description: SNMP Kyocera Device  <> Command line: check_snmp -H $HOSTADDRESS$  -o 1.3.6.1.4.1.1347.43.5.1.1.29.1 -P 2c -C public	SNMP Kyocera Device
		No conditions	Service description: SNMP Kyocera System  <> Command line: check_snmp -H $HOSTADDRESS$  -o 1.3.6.1.4.1.1347.43.5.4.1.5.1.1 -P 2c -C public	SNMP Kyocera System

Put the data in your favourite spreadsheet tool, for filtering, or whatever you want to do with it.

2 Likes