Hi everyone,
What I need to achieve: Various Nagios pages such as tactical overview available on a TV in our office which cycles every 15 seconds (among other pages) in our page viewer.
The problem: Authentication. Every time we close and open Chromium (this is running on a Raspberry Pi) we have to re-enter the credentials when the Nagios pages scroll round.
Does anyone have any suggestions as to how we can automatically login to Nagios and eliminate this problem?
We used to use the Nagios checker addon for Chromium which kept us logged in indefinitely, but it would seem that the extension no longer works.
Suggestions for Dashboarding
Re: Suggestions for Dashboarding
I have a solution may be stupid but it works
On the Pi setup nginx because its lightweight
configure it as a reverse proxy for thenagios host and have it provide the authentication for the nagios host without asking the client that connects
if you know nginx great if not,,,, a config like this should pass the request to the nagios host and provide the username / password
der Authorization "Basic bmFnaW9zOmlzY29vbA==";
}
bmFnaW9zOmlzY29vbA== is base64 encoded username and passoword "nagios:iscool"
10.1.1.69 is the nagios box
couple of security things
1) have it listen only for connections on 127.0.0.1 if you want to be safe
2) setup a dedicated readonly account just for this in nagios
On the Pi setup nginx because its lightweight
configure it as a reverse proxy for thenagios host and have it provide the authentication for the nagios host without asking the client that connects
if you know nginx great if not,,,, a config like this should pass the request to the nagios host and provide the username / password
Code: Select all
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://10.1.1.69:80;
proxy_set_hea}
bmFnaW9zOmlzY29vbA== is base64 encoded username and passoword "nagios:iscool"
10.1.1.69 is the nagios box
couple of security things
1) have it listen only for connections on 127.0.0.1 if you want to be safe
2) setup a dedicated readonly account just for this in nagios
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
Re: Suggestions for Dashboarding
@nozlaf - that's one way to do it! Thanks for the post -- reverse proxies can come in handy pretty darn often.
@NagiosRoss - append &username=&ticket= to the end of your dashboard URLS. The ticket= is going to be your API key which can be found by clicking your username when logged in. Here's an example -
http://192.168.4.223/nagiosxi/dashboard ... t=58fvbk58
@NagiosRoss - append &username=&ticket= to the end of your dashboard URLS. The ticket= is going to be your API key which can be found by clicking your username when logged in. Here's an example -
http://192.168.4.223/nagiosxi/dashboard ... t=58fvbk58
Former Nagios Employee