Hi,
Im got a requirement to find out which servers are using the same NRDP Config file before doing any modifications to the file.
I really appreciate if any of you can be of any help on how to do that.
List of hosts using the same NRDS Config File
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: List of hosts using the same NRDS Config File
Are you asking about the configs that are getting push from XI, or the configs on the remote servers? You'll just need to run a diff if you are talking about the configs on the remote hosts.
If you're talking about the first, then I think https://assets.nagios.com/downloads/nag ... h_NRDS.pdf will help you out.
If you're talking about the first, then I think https://assets.nagios.com/downloads/nag ... h_NRDS.pdf will help you out.
Re: List of hosts using the same NRDS Config File
Hi dwhitfield,
Thanks for your response. Yes, Im referring to the Configs getting pushed from Nagios XI Server.
For instance lets say Im using Nagios XI server to monitor 20 remote servers.
6 remote servers got config "A", 10 servers got config "B" and the rest of the 4 servers got config "C".
Now, after few months I couldnt remember which servers got which configuration. With 20 Servers obviously I can log into all of them and check what configurations they got. But it would become a headache as the number grows.
Now I want to find out which hosts got which NRDS configs without login into each of those servers. Is it possible to check it from the Nagios XI server itself ?
Thanks for your response. Yes, Im referring to the Configs getting pushed from Nagios XI Server.
For instance lets say Im using Nagios XI server to monitor 20 remote servers.
6 remote servers got config "A", 10 servers got config "B" and the rest of the 4 servers got config "C".
Now, after few months I couldnt remember which servers got which configuration. With 20 Servers obviously I can log into all of them and check what configurations they got. But it would become a headache as the number grows.
Now I want to find out which hosts got which NRDS configs without login into each of those servers. Is it possible to check it from the Nagios XI server itself ?
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: List of hosts using the same NRDS Config File
@yosh, I found this plugin on Nagios Exchange: https://exchange.nagios.org/directory/P ... ig/details
Other than that I think the solution would include writing some automated script using chef or puppet, or some other similar software.
Other than that I think the solution would include writing some automated script using chef or puppet, or some other similar software.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: List of hosts using the same NRDS Config File
The configs are pulled by the clients so you could get this information from the access logs in /var/log/httpd/. Searching the logs for the config name should show instances where the client's regularly POST requests checking for updates:
192.168.4.8 - - [23/Jan/2018:22:03:15 +0000] "POST /nrdp//?token=welcome&cmd=updatenrds&XMLDATA=<?xml%20version='1.0'%20?><configs><config><name>test_nrdp</name><version>0.1</version></config></configs> HTTP/1.1" 200 1120 "-" "Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)"
192.168.4.8 - - [23/Jan/2018:22:03:15 +0000] "POST /nrdp//?token=welcome&cmd=updatenrds&XMLDATA=<?xml%20version='1.0'%20?><configs><config><name>test_nrdp</name><version>0.1</version></config></configs> HTTP/1.1" 200 1120 "-" "Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: List of hosts using the same NRDS Config File
npolovenko wrote:@yosh, I found this plugin on Nagios Exchange: https://exchange.nagios.org/directory/P ... ig/details
Other than that I think the solution would include writing some automated script using chef or puppet, or some other similar software.
Thanks npolovenko. I think this VB Script plugin can be used in Windows machines only.
Re: List of hosts using the same NRDS Config File
cdienger wrote:The configs are pulled by the clients so you could get this information from the access logs in /var/log/httpd/. Searching the logs for the config name should show instances where the client's regularly POST requests checking for updates:
192.168.4.8 - - [23/Jan/2018:22:03:15 +0000] "POST /nrdp//?token=welcome&cmd=updatenrds&XMLDATA=<?xml%20version='1.0'%20?><configs><config><name>test_nrdp</name><version>0.1</version></config></configs> HTTP/1.1" 200 1120 "-" "Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5)"
Thanks cdienger. Unfortunately I couldnt find similar records in my access_logs.
I can confirm both below parameters are set in client machine too.
UPDATE_CONFIG="1"
UPDATE_PLUGINS="1"
The only 2 POST records with the config name that I can find in my access_logs are:
Code: Select all
10.10.10.212 - - [22/Jan/2018:11:21:47 +1100] "POST /nagiosxi/includes/components/nrdsconfigmanager/nrdsconfigmanager.php?mode=edit&edit=<Config_Name>&dir=configs HTTP/1.1" 200 29608 "http://10.130.128.148/nagiosxi/includes/components/nrdsconfigmanager/nrdsconfigmanager.php?mode=edit&edit=Vision_DB_Monitoring&dir=configs" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"
10.10.10.212 - - [22/Jan/2018:11:22:24 +1100] "POST /nagiosxi/includes/components/nrdsconfigmanager/nrdsconfigmanager.php?mode=edit&edit=<Config_Name>&dir=configs HTTP/1.1" 200 29608 "http://10.130.128.148/nagiosxi/includes/components/nrdsconfigmanager/nrdsconfigmanager.php?mode=edit&edit=Vision_DB_Monitoring&dir=configs" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0"-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: List of hosts using the same NRDS Config File
Maybe not: https://www.infoq.com/news/2017/08/dotnetcore2-vbyosh wrote: I think this VB Script plugin can be used in Windows machines only.
Give it a shot on a test server first, of course.
Re: List of hosts using the same NRDS Config File
Thanks dwhitfield..!
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: List of hosts using the same NRDS Config File
Were you able to get this working? I can certainly put in a feature request to have this logged on the XI side. If I were to make a request, this would not mean it would necessarily be included. It would simply be a request that the devs would take into consideration.