Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Dec 15, 2017 8:34 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: MySQL Script to change device hostname question - Cacti1.1
PostPosted: Fri Nov 03, 2017 10:13 am 
Offline

Joined: Wed Sep 20, 2017 2:59 pm
Posts: 8
Hi Cacti folk,

Some background info for my Cacti environment:

Automation adds devices and creates graphs for devices. Automation adds devices by IP instead of hostname (cant figure out a way to change this)
I created a MySQL script which changes the IP of the device to match the description of the device, which in my case, the description is also the device resolvable hostname


In essence all that is changing is the device hostname. The problem is that the device will sometimes register as "down" after the script changes.
The graphs stop pulling data, but the device is accessible from Cacti and SNMP is responding.


SQL Script:
UPDATE `host` SET `hostname` = `description` WHERE description LIKE '%ftth.us%' && hostname != description;


Are there any changes that need to be made to the graphs for this system to work? Or is there another way to get this to work? Any advice would be appreciated


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: majic and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group