so how can now i fix this .... and tnx for helping me ...root@nagios:/usr/local/nagios/libexec# /usr/bin/perl ./check_ups_pow.pl -h
No hostname specified
-----------------------------------------------------------------
check_ups_pow.pl v1.0
Monitors PowerWare UPS via SNMP management card.
Usage: check_ups_pow.pl -H <hostname> -C <community> [...]
Options: -H Hostname or IP address
-C Community (default is public)
-----------------------------------------------------------------
Copyright 2004 Altinity Limited
This program is free software; you can redistribute it or modify
it under the terms of the GNU General Public License
-----------------------------------------------------------------
root@nagios:/usr/local/nagios/libexec#
UPS
Re: UPS
Here it is ....
Re: UPS
Follow the help:
Obviously, replace <hostname> and <community>. . .
Code: Select all
/usr/bin/perl ./check_ups_pow.pl -H <hostname> -C <community>
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: UPS
Ok for using the pluging but do i always have to execute like this ... with "/usr/bin/perl" in front of it .... and if do, then i suppose i have to make the command in commands.cfg file like that with "/usr/bin/perl" in fron ... or is there a way to fix this in some other way ... ?
Also i have this problem now but i think i can handle it, i guess i have to dl mibs and fix this ...
Also i have this problem now but i think i can handle it, i guess i have to dl mibs and fix this ...
root@nagios:/usr/local/nagios/libexec# /usr/bin/perl ./check_ups_pow.pl -H 192.168.100.200 -C Test123
Status is a WARNING level - SNMP OID does not exist|
root@nagios:/usr/local/nagios/libexec#
Re: UPS
Isn't it a problem related to perl script copied from Windows to Linux machine?
suggests badly converted end of line characters (\r\n instead \n) in script file. You can see them after openning the file in vi editor.
Code: Select all
^M
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: UPS
Yes, you should be able to open in it in vim and change the line endings.
Then try to execute it again without /bin/perl in front.
Code: Select all
vim [filename]
:set ff=unix
:wq
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: UPS
Here it is the result without "/usr/bin/perl"
and here it is with "/usr/bin/perl "root@nagios:/usr/local/nagios/libexec# vim check_ups_pow.pl
root@nagios:/usr/local/nagios/libexec# ./check_ups_pow.pl -h
-bash: ./check_ups_pow.pl: /usr/local/groundwork/bin/perl: bad interpreter: No such file or directory
root@nagios:/usr/local/nagios/libexec#
root@nagios:/usr/local/nagios/libexec# /usr/bin/perl ./check_ups_pow.pl -H 192.168.100.200 -C mkptrlHQ
Status is a WARNING level - SNMP OID does not exist|
root@nagios:/usr/local/nagios/libexec#