Creating a dashboard that does not require user log in

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
netagurion
Posts: 10
Joined: Wed May 31, 2017 1:56 pm

Creating a dashboard that does not require user log in

Post by netagurion »

Hi,

I am having issues creating a dashboard to display on a large screen. I would like to set this up so the user will not have to log in to get the dashboard. Currently I have tried a few solutions.

I am running Nagios XI 5.4.12

I created a user that has read only privileges and created a dashboard under that user account.

When I try the following URL:

Code: Select all

http://llkwnagiosxi/nagiosxi/api/v1/dashboards/dashboard.php?id=g0YjDhBD&apikey=<api key from user account settings>
I get the error "No Endpoint: dashboards" and nothing shows up

When I try and use the following URL:

Code: Select all

http://server_name/nagiosxi/dashboards/dashboard.php?id=g0YjDhBD&username=kioskuser&ticket=<ticket number from API settings>
I get the dashboard to show but the dashlets say "Your session has timed out"

If I SSH into the server and run:

Code: Select all

curl -XGET "http://localhost/nagiosxi/api/v1/objects/hoststatus?apikey=<api key from user account settings>&pretty=1"
I get the expected output and appears to be working correctly.

I am at a loss as I believe I have correctly followed the instructions for 2 different ways to complete this task. Any help would be appreciated.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Creating a dashboard that does not require user log in

Post by npolovenko »

Hello, @netagurion. This is the right syntax:

Code: Select all

http://server_name/nagiosxi/dashboards/dashboard.php?id=g0YjDhBD&username=kioskuser&ticket=<ticket number from API settings>
But before using the link please go to the Admin settings, then System Config->System Settings in the left column, open the Security Tab and check the box that says:

Code: Select all

Disable - Do not restrict pages from being opened in iframes from anywhere. (Will not apply X-Frame-Options or Content-Security-Policy: frame-ancestors headers)
Click on Update Settings.
That should do it.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
netagurion
Posts: 10
Joined: Wed May 31, 2017 1:56 pm

Re: Creating a dashboard that does not require user log in

Post by netagurion »

I still got " your session has timed out" after updating the security setting and saving.

I am trying to use the Latest Alerts widget and it loads but where the content of the alert is supposed to be it says that it timed out.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Creating a dashboard that does not require user log in

Post by npolovenko »

@netagurion, This thread has a solution to the session timing out issue:
https://support.nagios.com/forum/viewto ... t=+session
Let me know if it works for you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
netagurion
Posts: 10
Joined: Wed May 31, 2017 1:56 pm

Re: Creating a dashboard that does not require user log in

Post by netagurion »

I am attaching a photo of the problem... for kicks I tried:

Code: Select all

session.gc_maxlifetime = 31536000
Per the post you referenced and it made no difference.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Creating a dashboard that does not require user log in

Post by lmiltchev »

Are you trying to open the link, made for the "kioskuser" user, while you are still logged in as another user, e.g. "nagiosadmin" (in the same browser)? What are the security settings of the "kioskuser" user? Are there any other check-boxes selected in addition to the "read-only" box?

You should be able to log in (or masquerade in) as "kioskuser", create a dashboard, and get a permalink for it. After this, you could use the "Backend API URL" component, grab the "ticket" for this user, and append the username and the ticket at the end of the permalink. Test the link in a new browser.

Did this work for you?
Be sure to check out our Knowledgebase for helpful articles and solutions!
netagurion
Posts: 10
Joined: Wed May 31, 2017 1:56 pm

Re: Creating a dashboard that does not require user log in

Post by netagurion »

Hello,

I finally got the dashboard to load, but it appears that my bandwidth graphs are in GMT and not EST as defined in the admin > system settings section.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Creating a dashboard that does not require user log in

Post by npolovenko »

@netagurion, Is your workstation located in the same timezone as the Nagios server? Or are they both located in the EST timezone? If the Nagios server is located in a different time zone then that is a known issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
netagurion
Posts: 10
Joined: Wed May 31, 2017 1:56 pm

Re: Creating a dashboard that does not require user log in

Post by netagurion »

Indeed. Changed the timezone on local device and the issue is rectified. Thanks for your help.. this can be closed out.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Creating a dashboard that does not require user log in

Post by scottwilkerson »

Glad it is working
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart