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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

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

Post 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
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

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

Post by progressive.nagiosXI »

Hi,

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

other details attached.

Thanks
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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.
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

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

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
progressive.nagiosXI
Posts: 277
Joined: Mon Jul 31, 2017 5:54 am

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

Post by progressive.nagiosXI »

Hi ,

given command Logs attached for two servers.


Thanks
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked