We are running:
Cacti Version 0.8.7h
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
I have a large number of hosts that need to have the host template changed to a new host_template.
I have looking in the "cli" folder and found what I think can help - "host_update_template.php"
So far I have not seen the desired result using this script.
The help for the command below is also somewhat confusing.
Code: Select all
<snip>
Cacti Retemplate Host Script 1.0, Copyright 2004-2011 - The Cacti Group
usage: host_update_template.php -host-id=[host-id|All] [--host-template=[ID]] [-d] [-h] [--help] [-v] [--version]
--host-id=host_id - The host_id to have templates reapplied 'all' to do all hosts
--host-template=ID - Which Host Template to Refresh
<snip>
The "Which Host Template to Refresh" is confusing - unless the script allowed changing the host template.
To better explain myself; given that a host has a host_template assigned already, what purpose would there be to refresh anything other than the existing host_template; so why specify it on the command line?
Conversely; if the intention of specifying the host_template was to allow changing the host's host_template; then it does not do that.
Can someone clarify my observations above so that I can understand.
Secondly, my need is to change the host_template on 91 hosts; how do you do this via command line.
Thank you in advance.
PS. If the answer is in the forums; I could not find it because a search for change host template command line cli (and other similar) returned:
Which excludes 99% of what I'm looking for. !!Search term used: change host template command line cli ignored: command change line host template
Thanks, Swordfish.