Nagios check_asterisk_channels monitoring plugin

i have installed nagioscore 3.2.3 and and i have installed nrpe addon on the asterisk server. i have downloaded the check_asterisk_channels . and did the rest of the things how we used to monitor the remote host.

Now the issue on remote host i am not able the run the pluggin in nagios user. saying error like

[nagios@centos6 ~]$ /usr/local/nagios/libexec/check_asterisk_channels
CRITICAL: Unable to connect to remote asterisk (does /var/run/asterisk/asteriskctl exist?)

but the file is there . if i run in root the check_asterisk_channels is working fine . Not able to run on nagios users.
give the some solutions those who got the solution.
my download plugin uder /usr/local/nagios/libexec/check_asterisk_channels
thanks for those who give solution to this issue

The general forum is not a support forum.

I would be surprised if anyone here was using that plugin.

However the diagnostic suggests that you are having permissions problems with “asterisk -r”. I’ve never run asterisk -r as any other user than the main Asterisk server, but, to be honest, I think it could be a security issue if it actually worked.

If it is supposed to work, I would look at directory permissions and SELinux settings.

Hi

Looking at the plugin its a bit of a nasty way of doing this, Much better to use on that connects to Asterisk via the manager interface and gets this information than one doing “asterisk -rx”

also if the box is remote npre over the internet is a little bit insecure.