Ludmill,
Thanks for taking the time to help me out with this! I've been trying to make it work for several hours now, but I'm still stuck. I guess I'm not the only one wanting to use NagVis maps in dashboards with custom url dashlet, your if we get this working your effort will help others too.
So I set:
Code: Select all
<html>
<head>
<title>NagVis 1.5.9 › Log In</title>
<script language="javascript">
function login(){
window.document.loginform.submit();
}
</script>
</head>
<body onload="login()">
<form action="http://nagiosserver/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=SB_Monitoring_Overview method="POST" name="loginform">
<input type="hidden" name="destination" value="http://srvnagios01/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=SB_Monitoring_Overview">
<input type="hidden" name="flags" value="0">
<input type="text" name="_username" value="sys_infoscreen">
<input type="password" name="_password" value="password">
<input type="submit" value="Login" name="SubmitCreds">
</form>
</body>
</html>
The first map in the view is "SB_Monitoring_Overview". We do not use rotating in NagVis, but use the views to rotate, so the nagVis map in each view should stay the same. So I then added a new custom url dashlet linking to "http://<IP ADDRESS>/readonly.html" as you said.
When I first clean all the saved passwords (in the Firefox protable edition on the terminal) and then start the web interface with this script:
Code: Select all
Set objShell = CreateObject( "WScript.Shell" )
objshell.Popup "De netwerkinterface wordt gestart. Even geduld...",10,"", 64
'strResult = 1
'do while strResult = 1 'continue when LAN active
'strResult = objShell.Run("cmd /c ping -n 1 adocmwgent.be",0,True)
'Loop
'do while strResult = 0 'contineous loop
strcmd = "cmd /c start /w """" " & chr(34) & "D:\FirefoxPortable\FirefoxPortable.exe" & chr(34) & " " & chr(34) & "http://nagiosserver/nagiosxi/views/?username=sys_infoscreen&ticket=099m60c2e4o30utkaoqndopk42efzefzefnaeklfnazklfnklaznfazklnblabla"
objShell.run strcmd,0,True
'objshell.Popup "De Nagios interface wordt gestart. Even geduld...",3,"",64
'loop
The view opens without having to use Nagios XI credentials, as the ticket is passed in the vb script. Then I get a popup "Authentication required" which asks for my credentials. AFter entering username and password, I get the option to remember the password. See screenshots. After clicking "remember the password", I'm logged. So then I close my Firefox protable and reopen it. After which I get another popup "authentication required", where the credentials are already set, so I only need to click Ok, but it's still not logging in automatically?
Am I forgetting something?
Besides the issue above it also always shows the NagVis overview page instead of the map I set in the url. (see screenshot)
Please advise how to continue making this work. I have the feeling i'm almost there...
<complain-mode>EDIT: Oh man this nagVis annoys me sometimes. I kind of hope you guys are working on some way to show dynamic images with host / service status icons natively on XI dashboards. Or find a way to integrate NagVis completely into XI. I don't know, but the current way of working is really not admin or user friendly... </complain-mode>
Grtz and thanks! (really)
Willem