Viewing Nagiosmobile with another user

Information and discussions relating to the Nagios Mobile addon.

Viewing Nagiosmobile with another user

Postby golden275 » Thu Jun 20, 2013 11:14 am

When I log in as nagiosadmin I am able to see all alarms.

I added a user: steven_test using the following:

htpasswd -n steven_test
New password:
Re-type new password:
steven_test:aixWKmi92FBfk

cat htpasswd.users
nagiosadmin:U0gXaDuMRKiCA
nagiosxi:MQYWHeSykOzW6
steven_test:aixWKmi92FBfk

So now I am able to log in as user: steven_test, but the dashboards only show 0's. When I log in to Nagios XI on my mobile device, I log in as steven_test and it shows all alarms in the status, so I don't think it is a user rights issue.

How can I enable other users to view the status?
golden275
 
Posts: 3
Joined: Mon Jun 17, 2013 10:49 am

Re: Viewing Nagiosmobile with another user

Postby abrist » Tue Aug 06, 2013 4:55 pm

You will need to add the new user to your cgi.cfg, specifically to one or more directives listed in the following document:
http://nagios.sourceforge.net/docs/3_0/cgiauth.html
For more information about the cgi configuration, see:
http://nagios.sourceforge.net/docs/3_0/configcgi.html
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Viewing Nagiosmobile with another user

Postby Windwalker » Tue Oct 01, 2013 3:58 pm

Hi there,

I have exactly the same problem with Nagios 3.4.1.

Did you solve the problem?

Regards,
Windwalker
 
Posts: 3
Joined: Tue Oct 01, 2013 3:52 pm

Re: Viewing Nagiosmobile with another user

Postby Windwalker » Tue Oct 01, 2013 4:04 pm

golden275 wrote:When I log in as nagiosadmin I am able to see all alarms.

I added a user: steven_test using the following:

htpasswd -n steven_test
New password:
Re-type new password:
steven_test:aixWKmi92FBfk

cat htpasswd.users
nagiosadmin:U0gXaDuMRKiCA
nagiosxi:MQYWHeSykOzW6
steven_test:aixWKmi92FBfk

So now I am able to log in as user: steven_test, but the dashboards only show 0's. When I log in to Nagios XI on my mobile device, I log in as steven_test and it shows all alarms in the status, so I don't think it is a user rights issue.

How can I enable other users to view the status?


I have exactly the same problem and my new contact is also added in contacts.cfg.

Did you solve this problem?

Regards
Windwalker
 
Posts: 3
Joined: Tue Oct 01, 2013 3:52 pm

Re: Viewing Nagiosmobile with another user

Postby scottwilkerson » Wed Oct 02, 2013 9:30 am

As abrist pointed out you will need to add the user to the appropriate field in cgi.cfg

You will need to add the new user to your cgi.cfg, specifically to one or more directives listed in the following document:
http://nagios.sourceforge.net/docs/3_0/cgiauth.html
For more information about the cgi configuration, see:
http://nagios.sourceforge.net/docs/3_0/configcgi.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 16679
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Viewing Nagiosmobile with another user

Postby Windwalker » Thu Oct 03, 2013 2:44 am

scottwilkerson wrote:As abrist pointed out you will need to add the user to the appropriate field in cgi.cfg

You will need to add the new user to your cgi.cfg, specifically to one or more directives listed in the following document:
http://nagios.sourceforge.net/docs/3_0/cgiauth.html
For more information about the cgi configuration, see:
http://nagios.sourceforge.net/docs/3_0/configcgi.html


Thanks for your reply.

I understand this, but the new user has limited access for only a few hosts (realized by a contact group).

Can I add this directive in the cgi.cfg?

Regards
Windwalker
 
Posts: 3
Joined: Tue Oct 01, 2013 3:52 pm

Re: Viewing Nagiosmobile with another user

Postby abrist » Thu Oct 03, 2013 11:26 am

Even after adding the contact to the cgi, their views will still be limited to only the objects they are contacts for.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Viewing Nagiosmobile with another user

Postby grantdoug » Mon Mar 14, 2016 12:22 pm

The suggested solution does not work on our Nagios core 3.5.1 installation.
grantdoug
 
Posts: 31
Joined: Wed Jan 20, 2016 4:33 pm

Re: Viewing Nagiosmobile with another user

Postby rkennedy » Mon Mar 14, 2016 12:44 pm

Can you please post your cgi.cfg, also, what username are you attempting to view as?
Former Nagios Employee
rkennedy
 
Posts: 6581
Joined: Mon Oct 05, 2015 11:45 am

Re: Viewing Nagiosmobile with another user

Postby grantdoug » Mon Mar 14, 2016 3:32 pm

# MODIFIED
authorized_for_all_host_commands=nagiosadmin,douggrant
authorized_for_all_hosts=nagiosadmin,douggrant
authorized_for_all_service_commands=nagiosadmin,douggrant
authorized_for_all_services=nagiosadmin,douggrant
authorized_for_configuration_information=nagiosadmin,douggrant
authorized_for_system_commands=nagiosadmin,douggrant
authorized_for_system_information=nagiosadmin,douggrant
default_statusmap_layout=6
# UNMODIFIED
action_url_target=_blank
default_statuswrl_layout=4
escape_html_tags=1
lock_author_names=1
main_config_file=/usr/local/nagios/etc/nagios.cfg
notes_url_target=_blank
physical_html_path=/usr/local/nagios/share
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
refresh_rate=90
show_context_help=1
url_html_path=/nagios
use_authentication=1
use_pending_states=1
use_ssl_authentication=0
grantdoug
 
Posts: 31
Joined: Wed Jan 20, 2016 4:33 pm

Next

Return to Nagios Mobile

Who is online

Users browsing this forum: No registered users and 1 guest