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!
Auto import dynamic TXT file
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Auto import dynamic TXT file
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.
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.
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.
Re: Auto import dynamic TXT file
Thanks a lot @npolovenko

-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Auto import dynamic TXT file
@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.