adding a batch of devices and graphs
Moderators: Developers, Moderators
adding a batch of devices and graphs
Are there instructions on how to add a list of devices from a batch file and define graphs for them at the same time?
Thanks,
George
Thanks,
George
Re: adding a batch of devices and graphs
Lots of tools in \cacti\cli\ for automation.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: adding a batch of devices and graphs
Once you have the devices installed, check out the Autom8 plugin. It will automagically create graphs & place them on the graph tree for you. It's a really huge time-saver and is also my favorite plugin.
-John
-John
Re: adding a batch of devices and graphs
Thank you for the input.
We are looking through the cli directory for a tool to add the devices and will likely use the "automagic" one to create graphs after we get the devices defined. But we need to get the 600 or so devices defined first.
We are hoping to be able to "feed" a script with a file (maybe a text file) that contains the device name, IP address, SNMP community, etc. and have it define the devices in Cacti for us.
Suggestions are always appreciated.
George
We are looking through the cli directory for a tool to add the devices and will likely use the "automagic" one to create graphs after we get the devices defined. But we need to get the 600 or so devices defined first.
We are hoping to be able to "feed" a script with a file (maybe a text file) that contains the device name, IP address, SNMP community, etc. and have it define the devices in Cacti for us.
Suggestions are always appreciated.
George
Re: adding a batch of devices and graphs
Get the number of the template, you want to use from this command:
php -q add_device.php --list-host-templates
let's say it is #9 (see below)
change dev1, dev2, etc.
change snmp community from public
php -q add_device.php --list-host-templates
let's say it is #9 (see below)
change dev1, dev2, etc.
change snmp community from public
Code: Select all
#!/bin/sh
dom="example.com"
cd /var/lib/cacti/cli/
if [ "$#" -eq "1" ] ; then
devices=$1
else
devices="dev1 dev2 dev3 dev4 dev5"
fi
for i in ${devices} ; do
echo $i
php -q add_device.php --template=9 --avail=snmp --version=2 --community=public --ip=${i}.${dom} --description=${i}
sleep 1
echo
done
Re: adding a batch of devices and graphs
Thank you for the ideas. We are not well-versed in writing/reading code or implementing scripts so we'll need to search for documents, study and interpret what that is saying. Then do some trial and error to see where that takes us. Not sure where to put the code listed above. What should we edit the dev1, dev2, etc. to? Not sure how to incorporate this with a file that has a list of devices
Thanks again,
George
Thanks again,
George
Re: adding a batch of devices and graphs
We figured out the template part.
How would we say the rest of the code in Windows?
Thanks,
George
How would we say the rest of the code in Windows?
Thanks,
George
-
- Posts: 1
- Joined: Sat Jan 09, 2021 2:08 am
Re: adding a batch of devices and graphs
Hi,
I have a question about adding devices with bulk. From cacti i can not ping 4.2.2.4 . Now i want to add this device in cacti with bulk forexample, but it failed and I get below error:
Failed to add device.
However if the IP is pingable I can add the device! Any one know how i can add a device which in not accessible in CACTI with bulk?
I have a question about adding devices with bulk. From cacti i can not ping 4.2.2.4 . Now i want to add this device in cacti with bulk forexample, but it failed and I get below error:
Failed to add device.
However if the IP is pingable I can add the device! Any one know how i can add a device which in not accessible in CACTI with bulk?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: adding a batch of devices and graphs
Well, you need to provide way more information.
1) What version of Cacti
2) What exact command did you run to add
3) Anything else, you OS, the PHP version, ...
Lastly, you should always start a separate thread, and not poach an old one.
1) What version of Cacti
2) What exact command did you run to add
3) Anything else, you OS, the PHP version, ...
Lastly, you should always start a separate thread, and not poach an old one.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 0 guests