Suggestions for Dashboarding

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
NagiosRoss
Posts: 21
Joined: Sat Feb 28, 2015 10:11 am

Suggestions for Dashboarding

Post by NagiosRoss »

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.
User avatar
nozlaf
Posts: 172
Joined: Sun Nov 09, 2014 9:50 pm
Location: Victoria, Australia

Re: Suggestions for Dashboarding

Post by nozlaf »

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

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
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
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Suggestions for Dashboarding

Post by rkennedy »

@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
Former Nagios Employee
Locked