Page 3 of 6
Re: i cant make non-official plugins to work
Posted: Thu Sep 19, 2013 2:57 am
by Sander5
I did not create a additional nagios directory. must i move all plugins to the libexec directory?
Re: i cant make non-official plugins to work
Posted: Thu Sep 19, 2013 1:57 pm
by abrist
Yes, it is suggested. Otherwise you must use a different path when referencing them.
Re: i cant make non-official plugins to work
Posted: Mon Sep 23, 2013 5:30 am
by Sander5
I moved all the plugins to libexec from libexec/nagios. still the same message.
Code: Select all
sudo -u nagios bash /usr/local/libexec/check_snmp_printer -H 10.240.2.102 -C public -x "CONSUM black"
Canon C-EXV 29 Black Toner is at 89% - OK! | Canon C-EXV 29 Black Toner=89;20;5;
this works but in the website it won't work. I dont understand why it refuses to work, has it something to do with bash?
I just added this 2>&1 to the end of variable in the command.cfg. now it shows this in nagios webui: /usr/local/libexec/check_snmp_printer: function: not found
Re: i cant make non-official plugins to work
Posted: Mon Sep 23, 2013 10:46 am
by sreinhardt
You should not be referencing direct paths within nagios. It is suggested to reference all plugins in the libexec dir with the $USER1$ variable. Such as: $USER1$/check_snmp_printer -H 10.240.2.102 -C public -x "CONSUM black"
Just to verify, you are just using core, and not nrpe or another remote agent?
Re: i cant make non-official plugins to work
Posted: Wed Sep 25, 2013 8:33 am
by Sander5
Just core.
it is still not working.
Re: i cant make non-official plugins to work
Posted: Wed Sep 25, 2013 3:05 pm
by lmiltchev
What is the value of $USER1$ in "/usr/local/nagios/etc/resource.cfg" file?
Re: i cant make non-official plugins to work
Posted: Thu Sep 26, 2013 2:52 am
by Sander5
$USER1$=/usr/local/libexec
It was /usr/local/libexec/nagios
Well you should not have a nagios directory under your libexec directory, all of your plugins should go into libexec
i did change it.
Re: i cant make non-official plugins to work
Posted: Thu Sep 26, 2013 10:28 am
by abrist
It seems like you have shell issues. What is your default shell?
Where is bash located:
Re: i cant make non-official plugins to work
Posted: Mon Sep 30, 2013 1:38 am
by Sander5
1. SHELL=/bin/csh
2. /usr/local/bin/bash
Re: i cant make non-official plugins to work
Posted: Mon Sep 30, 2013 9:32 am
by abrist
Just out of curiosity, if you change the default shell for nagios to bash, do you still have function problems with the plugins?