Nagiosadmin dosent have rights to disable notifications

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Nagiosadmin dosent have rights to disable notifications

Postby mfrycke » Wed Apr 19, 2017 2:47 am

Hi.

I have a problem with that user nagiosadmin dosent have rights to disable notification on nagios core web gui.
Where can i set the rights so that nagioaadmin can do that?

Server Ubuntu 14
Nagios 4.3.1
mfrycke
 
Posts: 29
Joined: Wed Mar 22, 2017 9:40 am

Re: Nagiosadmin dosent have rights to disable notifications

Postby rhassing » Wed Apr 19, 2017 4:18 am

In the file cgi.cfg (either in /usr/local/nagios/etc/ or /etc/nagios/):

authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin
Rob Hassing
Image
Have I been helpful? Nominate me for a Nagios MVP award!
User avatar
rhassing
 
Posts: 347
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Nagiosadmin dosent have rights to disable notifications

Postby mfrycke » Wed Apr 19, 2017 6:44 am

ok.. i check that file and nagiosadmin is authorized for
authorized_for_system_information
authorized_for_configuration_information
authorized_for_system_commands
authorized_for_all_services
authorized_for_all_hosts
authorized_for_all_service_commands
authorized_for_all_host_commands
mfrycke
 
Posts: 29
Joined: Wed Mar 22, 2017 9:40 am

Re: Nagiosadmin dosent have rights to disable notifications

Postby mfrycke » Wed Apr 19, 2017 6:46 am

the error messeges is
Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!
The permissions on the external command file and/or directory may be incorrect. Read the FAQs on how to setup proper permissions.
An error occurred while attempting to commit your command for processing.
mfrycke
 
Posts: 29
Joined: Wed Mar 22, 2017 9:40 am

Re: Nagiosadmin dosent have rights to disable notifications

Postby rhassing » Wed Apr 19, 2017 7:04 am

Does the file '/usr/local/nagios/var/rw/nagios.cmd exist on your system?
ls -l /usr/local/nagios/var/rw/nagios.cmd


Please check where the command file is located:
grep command_file /usr/local/nagios/etc/nagios.cfg
Rob Hassing
Image
Have I been helpful? Nominate me for a Nagios MVP award!
User avatar
rhassing
 
Posts: 347
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Nagiosadmin dosent have rights to disable notifications

Postby mfrycke » Wed Apr 19, 2017 7:16 am

yes. rw file is there.

vi shows this

" ============================================================================
" Netrw Directory Listing (netrw v149)
" /usr/local/nagios/var/rw
" Sorted by name
" Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec
" ============================================================================
../
./
nagios.cmd|
nagios.qh|


in nagios.cfg
# You can specify individual object config files as shown below:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg


# EXTERNAL COMMAND FILE
# This is the file that Nagios checks for external command requests.
# It is also where the command CGI will write commands that are submitted
# by users, so it must be writeable by the user that the web server
# is running as (usually 'nobody'). Permissions should be set at the
# directory level instead of on the file, as the file is deleted every
# time its contents are processed.

command_file=/usr/local/nagios/var/rw/nagios.cmd
mfrycke
 
Posts: 29
Joined: Wed Mar 22, 2017 9:40 am

Re: Nagiosadmin dosent have rights to disable notifications

Postby rhassing » Wed Apr 19, 2017 8:47 am

What are the permissions on /usr/local/nagios/var/rw/nagios.cmd ?
Rob Hassing
Image
Have I been helpful? Nominate me for a Nagios MVP award!
User avatar
rhassing
 
Posts: 347
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Nagiosadmin dosent have rights to disable notifications

Postby tgriep » Wed Apr 19, 2017 11:54 am

To view the permissions of that file as well as the nagios group settings, can you login to the server as root, run the following and post the output?
Code: Select all
ls -l /usr/local/nagios/var/rw/nagios.cmd
grep nag /etc/group
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 6086
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagiosadmin dosent have rights to disable notifications

Postby mfrycke » Thu May 11, 2017 6:34 am

xxx@ubusrv02:/usr/local/nagios/etc⟫ ls -l /usr/local/nagios/var/rw/nagios.cmd
prw-rw---- 1 nagios nagios 0 Apr 3 13:31 /usr/local/nagios/var/rw/nagios.cmd

xxx@ubusrv02:/usr/local/nagios/etc⟫ grep nag /etc/group
nagios:x:1001:
nagcmd:x:1002:nagios,www-data
mfrycke
 
Posts: 29
Joined: Wed Mar 22, 2017 9:40 am

Re: Nagiosadmin dosent have rights to disable notifications

Postby tgriep » Thu May 11, 2017 8:50 am

It looks like the nagios user and the Apache used it missing from the nagios group and that is probably the issue.
Edit the /etc/group file and change the nagios group settings from
Code: Select all
nagios:x:1001:

to
Code: Select all
nagios:x:1001:nagios,www-data

Save the file and see if the nagiosadmin can disable the notifications now.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 6086
Joined: Thu Oct 30, 2014 9:02 am

Next

Return to Nagios Core

Who is online

Users browsing this forum: Bing [Bot] and 23 guests

cron