check-cisco.pl : No such file or directory
check-cisco.pl : No such file or directory
Hi,
Can anyone help me with my error.
when i run
./check-cisco.pl
it say's
: No such file or directory
Can anyone help me with my error.
when i run
./check-cisco.pl
it say's
: No such file or directory
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: check-cisco.pl : No such file or directory
Where did you download the plugin from?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check-cisco.pl : No such file or directory
@Box293
Hi,
i've just copy paste the script from the link below.
https://github.com/ranl/monitor-utils/b ... k-cisco.pl
My goal is get a nagios plugins for me to monitor cisco switches, not just the ports but also the cpu,memory,temperature etc..
:Can you be kind enough to tell me if there another plugin to meet my goal?. Thanks for in advance
Hi,
i've just copy paste the script from the link below.
https://github.com/ranl/monitor-utils/b ... k-cisco.pl
My goal is get a nagios plugins for me to monitor cisco switches, not just the ports but also the cpu,memory,temperature etc..
:Can you be kind enough to tell me if there another plugin to meet my goal?. Thanks for in advance
Re: check-cisco.pl : No such file or directory
"No such file or directory" usually means that the script you are trying to run does not exist.
Can you run the following commands and show us their output?
Can you run the following commands and show us their output?
Code: Select all
./check-cisco.pl
ls -l
Former Nagios employee
Re: check-cisco.pl : No such file or directory
@tmcdonald
Hi,
The file is indeed present on the libexec directory
what i do is i copy paste the script using vim then i make the file into an executable.
is there something missing on my steps?
Hi,
The file is indeed present on the libexec directory
what i do is i copy paste the script using vim then i make the file into an executable.
is there something missing on my steps?
- Attachments
-
- checks.jpg (8.25 KiB) Viewed 10736 times
Re: check-cisco.pl : No such file or directory
Hi All,
I have successfully test the script , i just need to write perl in the beginning
perl ./check-cisco.pl
my next problem is how can i execute this script in my nagios monitoring? having the perl in the beginning of the script?
I have successfully test the script , i just need to write perl in the beginning
perl ./check-cisco.pl
my next problem is how can i execute this script in my nagios monitoring? having the perl in the beginning of the script?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: check-cisco.pl : No such file or directory
You should not need to run the script this way.braindope wrote:I have successfully test the script , i just need to write perl in the beginning
perl ./check-cisco.pl
The source of your problem lies with the first line of the script.
Code: Select all
#!/usr/bin/env perlOn my installation, perl is located in /usr/bin/
Where is it in yours?
Code: Select all
su nagios
find /usr -name perlCode: Select all
su nagios
/usr/bin/envCode: Select all
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/binAlternatively you could change line 1 of the script to point directly to perl without changing the path:
Code: Select all
#!/usr/bin/perlYou will need to create a command in your commands.cfg file, something like:braindope wrote:my next problem is how can i execute this script in my nagios monitoring?
Code: Select all
define command {
command_name check-cisco
command_line $USER1$/check-cisco.pl -H $HOSTADDRESS$ -C $ARG1$ -t $ARG2$ $ARG3$
}Code: Select all
define service {
host_name The Host You Are Assigning It To
service_description Cisco Temperature Check
use local-service
check_command check-cisco!public!temp!-w 20 -c 30
register 1
}Something like that.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check-cisco.pl : No such file or directory
@ Box293
Hi,
You are absolutely correct i just change #!/usr/bin/env perl with #!/usr/bin/perl -w , the plugins is now running ,the extra line above the result can be ignore.
Useless use of array element in void context at ./check-cisco.pl line 480.
Lastly i am trying to graph the data using pnp4 nagios ,i just add srv-pnp on the service ,just like before but it yielded the error below. Any idea on this?
Hi,
You are absolutely correct i just change #!/usr/bin/env perl with #!/usr/bin/perl -w , the plugins is now running ,the extra line above the result can be ignore.
Useless use of array element in void context at ./check-cisco.pl line 480.
Cpu: CRIT - Cpu Load 5% 6% 6% | cpu_5s=5 percent;0;0 cpu_1m=6 percent cpu_5m=6 percent
Lastly i am trying to graph the data using pnp4 nagios ,i just add srv-pnp on the service ,just like before but it yielded the error below. Any idea on this?
Re: check-cisco.pl : No such file or directory
Hi All,
Update:
I have now a graph
, i've just deleted the MB in the line below which is the supposed unit
$perf = "memory_total=$mem_total\ MB memory_used=$mem_used\ MB";
and also in the CPU ,i have deleted the percent word
$perf = "cpu_5s=$load_5s\ percent;$warn;$crit cpu_1m=$load_1m\ percent cpu_5m=$load_5m\ percent";
PS: Thank you for all the feedback, if you have other method that is more neat or correct than what i have done ,please do teach me
Update:
I have now a graph
$perf = "memory_total=$mem_total\ MB memory_used=$mem_used\ MB";
and also in the CPU ,i have deleted the percent word
$perf = "cpu_5s=$load_5s\ percent;$warn;$crit cpu_1m=$load_1m\ percent cpu_5m=$load_5m\ percent";
PS: Thank you for all the feedback, if you have other method that is more neat or correct than what i have done ,please do teach me
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check-cisco.pl : No such file or directory
Awesome, thanks for letting us know. In the future, please add your additional questions from other topics in new threads. That assures that both the team members with those expertise take a look first, and that we keep threads devoid of extra clutter, thanks! :