i cant make non-official plugins to work
Re: i cant make non-official plugins to work
yes /usr/local/libexec/check_snmp_printer: function: not found
On CLI if i change the script #!/bin/sh to #!/bin/bash it gives me no errors. but when i leave it at /sh i comes with the function: not found error.
On CLI if i change the script #!/bin/sh to #!/bin/bash it gives me no errors. but when i leave it at /sh i comes with the function: not found error.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: i cant make non-official plugins to work
This could be an issue with the interpreter. If it is working on your system with #!/bin/bash I would change it to that.
Re: i cant make non-official plugins to work
I changed it. and now it is back to (Return code of 127 is out of bounds - plugin may be missing) again....
(i also just changed the default shell from csh to bash, same result...return code of 127...)
(i also just changed the default shell from csh to bash, same result...return code of 127...)
Re: i cant make non-official plugins to work
Does the altered check now work from the cli and is just reporting the 127 error through nagios?
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: i cant make non-official plugins to work
Yes just the 127 error in nagios
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: i cant make non-official plugins to work
What are the permissions on this plugin now? Can you run the following:
Code: Select all
ll -la /usr/local/nagios/libexec/pluginnameRe: i cant make non-official plugins to work
-rwxr-xr-x 1 root wheel 32647 Sep 26 09:58 /usr/local/libexec/check_snmp_printer
This is what you meant, right?
This is what you meant, right?
Re: i cant make non-official plugins to work
Can you run the check as the user "nagios" ?
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: i cant make non-official plugins to work
Yes i can run the command as nagios.
Altough i do not know which user runs the commands from the website, could it be another user?
Altough i do not know which user runs the commands from the website, could it be another user?
Re: i cant make non-official plugins to work
The commands should be run as the user 'nagios'. Do you only have issues with this one plugin?
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.