Dynamic Google maps
Dynamic Google maps
Hello
My idea was to dynamically change the coordinates of the hosts that are monitored. So idea was to get GPS coordinates every few minutes and to change the entry in the notes field, but after that I would need to force Nagios to read from that file. Is there any way I could do that from command line interface?
Any ideas
My idea was to dynamically change the coordinates of the hosts that are monitored. So idea was to get GPS coordinates every few minutes and to change the entry in the notes field, but after that I would need to force Nagios to read from that file. Is there any way I could do that from command line interface?
Any ideas
Re: Dynamic Google maps
Changing those values will require a nagios restart. To automate it, you will need to do a db update in nagiosql, or use the static directory and have your script alter the configs outside of the CCM.
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: Dynamic Google maps
Interesting idea. We have a bus riding through Ghent offering services to the people of Ghent. Please let us know if you managed to make this work. 
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Dynamic Google maps
The major issue is the required process restarts for updates. You may be better off saving the coordinate info somewhere else so that you do not need to restart nagios.
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: Dynamic Google maps
abrist wrote:The major issue is the required process restarts for updates. You may be better off saving the coordinate info somewhere else so that you do not need to restart nagios.
How you mean save somewhere else, the Google Maps plugin always looks into the same place?
Re: Dynamic Google maps
I tried that and it somehow does not work, I changed it and restarted the service, but the changes weren't there.abrist wrote:Changing those values will require a nagios restart. To automate it, you will need to do a db update in nagiosql, or use the static directory and have your script alter the configs outside of the CCM.
Re: Dynamic Google maps
The google maps component is its own beast. I guess my comments referring to the coordinates in the con figs really only applies to Nagvis.
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: Dynamic Google maps
Do you know where I could get more answers for the Google Maps component?abrist wrote:The google maps component is its own beast. I guess my comments referring to the coordinates in the con figs really only applies to Nagvis.
Re: Dynamic Google maps
You could look at the code that is in the component directory: (it loops through hosts, looking at the notes field for lat,lon). Maybe look into modifying this code to read your alternate host locations from a db?
There is also the integration documentation here:
http://assets.nagios.com/downloads/nagi ... ith_XI.pdf
Hope this helps.
Code: Select all
/usr/local/nagiosxi/html/includes/components/googlemap/[b]buildmakers.inc.php[/b]http://assets.nagios.com/downloads/nagi ... ith_XI.pdf
Hope this helps.
Re: Dynamic Google maps
Thank you very much I will look through that, if I will be able to make sensecmerchant wrote:You could look at the code that is in the component directory: (it loops through hosts, looking at the notes field for lat,lon). Maybe look into modifying this code to read your alternate host locations from a db?
There is also the integration documentation here:Code: Select all
/usr/local/nagiosxi/html/includes/components/googlemap/[b]buildmakers.inc.php[/b]
http://assets.nagios.com/downloads/nagi ... ith_XI.pdf
Hope this helps.
But this is at least something to start with