Page 1 of 1

HELP -easy perl script-

Posted: Sun Nov 02, 2014 10:49 am
by rambaldi85
Hi, can someone help me to create a easy Pers or Shell script to make the same like:

check_snmp -H $HOSTADDRESS$ -o 1.3.6.1.4.1.6302.2.1.2.2.0 -C public -u mV -l OutPower -w 48000:40000 -c 39999:0

BUT the Outpower must be in V (not in mV like the Output from the check_snmp plugin)
I neet a 1:1000 Output

THANKS:)

Re: HELP -easy perl script-

Posted: Mon Nov 03, 2014 10:27 am
by tmcdonald
Can you show us an example of the script being run from the command line and the output it currently shows?

Re: HELP -easy perl script-

Posted: Thu Nov 06, 2014 9:44 am
by rhassing
In perl you can easily divide your variable like this:

Code: Select all

$output_V=$output_mV/1000;

Re: HELP -easy perl script-

Posted: Thu Nov 06, 2014 3:16 pm
by abrist
Thanks Rob!