plugin writing help

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

plugin writing help

Post by benhank »

Hey guys I am going to attempt to write my own plugin to check certain iyems on an apc pdu. Is there any docs out there that shouw how to write plugings using snmp polling?
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: plugin writing help

Post by npolovenko »

Hi, @benhank. I think we've got some plugins on the exchange that you can look at:
https://exchange.nagios.org/index.php?o ... =apc%20pdu
You might be able to find an existing plugin that does what you need.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: plugin writing help

Post by benhank »

Those plugins will most likely work, But I am looking for info that will help me write my own.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: plugin writing help

Post by tmcdonald »

Really depends on the language you wanna use. Straight-up Bash? Then any command you can run from the command line is up for grabs. Python? Perl? You'll wanna look into some of the libraries that are available to you:

Python: https://easysnmp.readthedocs.io/en/latest/
Perl: http://search.cpan.org/~dtown/Net-SNMP- ... et/SNMP.pm

Aside from the SNMP-specific stuff, the rest is just building the logic to determine thresholds and process arguments. That's a little outside the scope of what we can directly assist with, but Google is your friend here and there are plenty of guides and code samples to guide you.
Former Nagios employee
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: plugin writing help

Post by benhank »

yeah I was thinking bash. you can lock this one.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Locked