Auto import dynamic TXT file

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nagchef
Posts: 4
Joined: Thu Apr 04, 2019 12:48 am

Auto import dynamic TXT file

Post by nagchef »

Hello guys,
i want to auto-import a TXT/CSV file with different IP-Adresses periodical (e.g. 1 time per day) and my Nagios XI then should Ping them... (and delete old IPs which are no longer part of the file).
This is, because the IPs can change very often and the simple way is to change this file.

Is there a way to realize it?
Thanks!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Auto import dynamic TXT file

Post by npolovenko »

Hello, @nagchef. If you put host definitions in the /usr/local/nagios/etc/static/ folder they will not be added to the CCM or imported in the database but hosts will display directly on the home page.
So if you write a script that will dynamically update IP address of a host in the host config located in the static folder and then restart the nagios service, you will achieve what you want.

But the easiest way, in my opinion, is to use the API PUT command to update IP addresses of existing hosts.
Untitled.png
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
nagchef
Posts: 4
Joined: Thu Apr 04, 2019 12:48 am

Re: Auto import dynamic TXT file

Post by nagchef »

Thanks a lot @npolovenko
:mrgreen:
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Auto import dynamic TXT file

Post by npolovenko »

@nagchef, No problem. Are we good to close this thread as resolved?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked