Auto-Login only for a single host
Auto-Login only for a single host
Hi,
we are planning to establish a litte NOC-screen (TV + RaspberryPi). For that we want a script to open the Nagios XI rotating views of the "raspberry"-Account in a browser on boot and display it on the TV without user interaction.
Can we pass the credentials for the login-script with the URL? The alternative would be to enable auto-login for this single host (fixed IP-adress) as we don't want auto-login for all clients.
What is the best solution?
Thanks a lot.
we are planning to establish a litte NOC-screen (TV + RaspberryPi). For that we want a script to open the Nagios XI rotating views of the "raspberry"-Account in a browser on boot and display it on the TV without user interaction.
Can we pass the credentials for the login-script with the URL? The alternative would be to enable auto-login for this single host (fixed IP-adress) as we don't want auto-login for all clients.
What is the best solution?
Thanks a lot.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Auto-Login only for a single host
You would be best suited to send it via the web page and not enable auto-login. You absolutely can either append the user credentials to a post request(I believe) then connect yourself to the page you would like, or directly go to the page you want, and append the user you wish to authenticate as backend api ticket to the url. Such as
Code: Select all
http://localhost/nagiosxi/username=test-admin&ticket=[backend ticket ID]Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Auto-Login only for a single host
Thank you, it works like that (with Firefox, not with IE(?)):
Last question how can I start the page in full-screen like when I click on the small blue arrow in XI unter interface?
Code: Select all
https://192.168.1.1/nagiosxi/views/?username=test&ticket=xxxxxxxxRe: Auto-Login only for a single host
You can get the URL for a particular dashboard/view by right-clicking the page and (at least in Firefox) click "This Frame -> Open Frame in New Tab". Then the URL in the address bar will point directly to the dashboard/view you were on without the sidebar.
Former Nagios employee
Re: Auto-Login only for a single host
Yes thanks. A
Re: Auto-Login only for a single host
Viewing a specific page in "fullscreen" will only show that page. The rotation is handled by the outer frame (the header, footer, and sidebar) dynamically loading each page every 7 seconds (or however fast you have it set to rotate).
Former Nagios employee
Re: Auto-Login only for a single host
Hi everyone,
I need to push this thread up, sorry for that.
We want to use a raspi to display different opscreens for different hostgroups on a TV. So I created a user which can see hosts in hostgroup1 and another for hostgroup2.
The raspi first polls
after some seconds it polls
The problem is that only hosts / alarms from hostgroup1 are shown although hostgroup2 is polled. This is no local caching issue on the raspi.
Can you give me a hint please?
Thanks alot and best wishes
b2m
I need to push this thread up, sorry for that.
We want to use a raspi to display different opscreens for different hostgroups on a TV. So I created a user which can see hosts in hostgroup1 and another for hostgroup2.
The raspi first polls
Code: Select all
https://w.x.y.z/nagiosxi/includes/components/opscreen/opscreen.php?username=user1&ticket=ticket1Code: Select all
https://w.x.y.z/nagiosxi/includes/components/opscreen/opscreen.php?username=user2&ticket=ticket2Can you give me a hint please?
Thanks alot and best wishes
b2m
Re: Auto-Login only for a single host
So, just to clarify, the views rotate but the data displayed is only for the first hostgroup and never the second?b2m wrote:The problem is that only hosts / alarms from hostgroup1 are shown although hostgroup2 is polled. This is no local caching issue on the raspi.
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.
"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.
Re: Auto-Login only for a single host
Exactly, you got it. I've got 22 hosts in hostgroup1 which are also shown when hostgroup2 should be shown. I also tried this with Firefox.abrist wrote:So, just to clarify, the views rotate but the data displayed is only for the first hostgroup and never the second?b2m wrote:The problem is that only hosts / alarms from hostgroup1 are shown although hostgroup2 is polled. This is no local caching issue on the raspi.
Re: Auto-Login only for a single host
I am not sure how you set up the rotation in the browser but you will need to find a way for clearing cookies BEFORE loading each URL.
Be sure to check out our Knowledgebase for helpful articles and solutions!