Page 1 of 1

HP-UX |getting permission denied error |monitoring by agent

Posted: Wed May 01, 2019 3:43 am
by progressive.nagiosXI
Hi,

we are getting permission denied error for server we share Nagios status snapshot and permission of drives snapshot via login to server.

/hadr_backup Disk usage = OK
/sybase/.. Disk usage = Permission Error

Thanks

Re: HP-UX |getting permission denied error |monitoring by ag

Posted: Wed May 01, 2019 10:12 am
by ssax
Please send the output of these commands, we don't have HP-UX here so you'll need to translate them into the proper commands in HP-UX if they differ:

Code: Select all

ls -ld /sybase
ls -l /sybase
Please attach your agent config from the remote system as well:

Code: Select all

nrpe.cfg
common.cfg
Please send me a copy of your profile as well so that I can look at the exact command you're running, you can download it from Admin > System Profile > Download Profile and upload it to the ticket by clicking the "choose item" link at the bottom of the menu.​ Make sure to wait until the file is finished uploading before clicking the Post Reply button.

Thank you

Re: HP-UX |getting permission denied error |monitoring by ag

Posted: Thu May 02, 2019 11:28 am
by progressive.nagiosXI
Hi,

we are not able to find common.cfg in /usr/local/nagios/etc.

other details attached.

Thanks

Re: HP-UX |getting permission denied error |monitoring by ag

Posted: Thu May 02, 2019 4:49 pm
by ssax
NRPE runs as the nagios user/nagios group.

Through NRPE in daemon mode (just showing you):
- /usr/local/nagios/etc/nrpe.cfg

Code: Select all

# NRPE USER
# This determines the effective user that the NRPE daemon should run as.
# You can either supply a username or a UID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

nrpe_user=nagios



# NRPE GROUP
# This determines the effective group that the NRPE daemon should run as.
# You can either supply a group name or a GID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

nrpe_group=nagios
Or if you run it through XINETD:
- /etc/xinetd/nrpe

Code: Select all

    user            = nagios
    group           = nagios

But the reason is that these permissions do not allow read access by the nagios user or group:

Code: Select all

HEPDBCI:/ #ls -ld /sybase
drwxr-x---   3 sybp30     sapsys          96 Apr  2 10:23 /sybase
So you can add the nagios user to the sapsys group in your /etc/groups file....

OR

You can change your nrpe.cfg command from this:

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
To this:

Code: Select all

command[check_disk]=sudo /usr/local/nagios/libexec/check_disk $ARG1$
Then try again.

Re: HP-UX |getting permission denied error |monitoring by ag

Posted: Wed May 08, 2019 12:35 pm
by progressive.nagiosXI
Hi ,

after given steps issue still not resolved .

Note:-we not restart nrpe service.

Please share NRPE service restart steps for HP-UX .

Thanks

Re: HP-UX |getting permission denied error |monitoring by ag

Posted: Wed May 08, 2019 4:57 pm
by tgriep
Can you login to the HP-UX server as root, run the following commands and post the output here?

Code: Select all

ps -ef |grep nrpe
netstat -anp |grep 5666
grep nag /etc/group
grep nrpe /etc/group
ls -l /
ls -l /sybase
Thanks.

Re: HP-UX |getting permission denied error |monitoring by ag

Posted: Tue May 14, 2019 11:53 am
by progressive.nagiosXI
Hi ,

given command Logs attached for two servers.


Thanks

Re: HP-UX |getting permission denied error |monitoring by ag

Posted: Tue May 14, 2019 12:56 pm
by tgriep
The permissions on the /sybase folder has to be changed to the nagios user account can access the folders in it.
Run this as root to set the permissions on the /sybase folder so the nagios user account can read it.

Code: Select all

chmod 777 /sybase
We do not have access to an HP-UX server but it looks like the NRPE agent is running out of xinetd or inetd so restarting those would restart NRPE.

Another thing, the server at address 10.199.3.38 has a lot of NRPE agents stuck running since February 24th.
You could stop them by killing them off to free up some memory and resources.