Page 1 of 1

Issue with installed plugin

Posted: Wed Sep 07, 2016 12:13 pm
by rbuckle
So i installed a plugin and i am getting this error:

Unknown - Read or Write File /var/tmp/check_traffic_10.15.100.254_2__itnmsJ.hist_dat_64 Error with user uid=500(nagios) gid=500(nagios) groups=500(nagios),501(nagcmd).

This is probably a really easy question.

Plugin was installed using the XI Interface.

Thank you

Re: Issue with installed plugin

Posted: Wed Sep 07, 2016 12:17 pm
by rkennedy
Which plugin did you install, and where are you seeing that error? Could you post the related service / command definition for us to look at as well?

Re: Issue with installed plugin

Posted: Wed Sep 07, 2016 12:49 pm
by rbuckle
Plugin: Check_Traffic:
https://exchange.nagios.org/directory/P ... sh/details

Error is in XI's Service Detail page.

Command Used: $USER1$/check_traffic.sh -V $ARG1$ -C $ARG2$ -H $HOSTADDRESS$ -I $ARG3$ -p $ARG4$ -w 45,45 -c 55,55

Image

Re: Issue with installed plugin

Posted: Wed Sep 07, 2016 1:00 pm
by Box293
It's likely that this file:

/var/tmp/check_traffic_10.15.100.254_2__itnmsJ.hist_dat_64

Is being used as a temporary storage file that the check uses each time it runs.

If you tested it at the command line as the "root" user then the file would be owned by root and the nagios user can't update it.

Also, if you used the "Test Check Command" button in CCM, then the same issue is occuring except CCM executes as the apache user.

Delete the file /var/tmp/check_traffic_10.15.100.254_2__itnmsJ.hist_dat_64
Go back to the home screen and find the Service
When viewing the Service Status Details page click the Schedule a forced immediate check link

For all further testing for this service DO NOT use the "Test Check Command" button, or go to an ssh session as the root user. If you really must test it from the CLI, su as the nagios user first.

Code: Select all

su nagios
xxxx the plugin command

Re: Issue with installed plugin

Posted: Wed Sep 07, 2016 2:58 pm
by rbuckle
Thank you, this error has gone away now... You may close the thread

Thank you again for your help.