Automated Device Entry
Moderators: Developers, Moderators
Automated Device Entry
I have not found any documentation or a post relating to this.
What we are looking at trying with Cacti is to utilize an existing database of devices on our network(currently 5,700+) I already know the IP of ever device and the OID that will be used, but what I'm wanting to figure out is how I can automate the entry of these devices and set the "location" tree up correctly because each device has a location and new devices are added hourly usually around 150-200 a month. Using this existing database I know the "Category / Location" for each and every device and the device names and types. I am trying to figure out how I could script the input of all new devices into cacti as they come in and build out just as if I was doing it by hand. As you can see manually adding these devices would be overly time consuming.
What we are looking at trying with Cacti is to utilize an existing database of devices on our network(currently 5,700+) I already know the IP of ever device and the OID that will be used, but what I'm wanting to figure out is how I can automate the entry of these devices and set the "location" tree up correctly because each device has a location and new devices are added hourly usually around 150-200 a month. Using this existing database I know the "Category / Location" for each and every device and the device names and types. I am trying to figure out how I could script the input of all new devices into cacti as they come in and build out just as if I was doing it by hand. As you can see manually adding these devices would be overly time consuming.
Sounds like the job for a plugin. http://docs.cacti.net/plugins:development
| 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 |
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Can't the cli tools do this?
You would need to some script to read your database and figure out what was new etc, but you'd need that anyway.
You would need to some script to read your database and figure out what was new etc, but you'd need that anyway.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
If you real do a search on the form and did not find a single post, the search engine could have a dramatic failure.
I posted at least 4 topics on staht, explaining how to edit and utilize add_device.php and add_graphs-php to generate devices and graphs automaticly.
If you are interessted in this stuff you can do a search on cacti cli, "add_graphs.php" and "automate cacti".
I build up a complet automation backend, partly in perl, which is much faster than the original stuff. You also may contact me and get a discount on the scripts for sure
I posted at least 4 topics on staht, explaining how to edit and utilize add_device.php and add_graphs-php to generate devices and graphs automaticly.
If you are interessted in this stuff you can do a search on cacti cli, "add_graphs.php" and "automate cacti".
I build up a complet automation backend, partly in perl, which is much faster than the original stuff. You also may contact me and get a discount on the scripts for sure
You are correct , it's not the search that is broken, but it was me who was broken I for some reason thought I searched these forums but I did not I do appologize, and I spend most of the night reading through parts of cacti and I think I'm going to lay in the framework using Python. I also believe for my situation I will need to build a customized plugin.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
I just posted my very recent plugin, autom8.
It will NOT cover the device creation (this is done by add_device.php), but it will automate graph creation and tree entries.
Be warned. A beginner might not understand on the first run. And there's a good chance to break your installation using faulty rules created with this plugin.
Reinhard
It will NOT cover the device creation (this is done by add_device.php), but it will automate graph creation and tree entries.
Be warned. A beginner might not understand on the first run. And there's a good chance to break your installation using faulty rules created with this plugin.
Reinhard
I have gone through all the cli php files and began testing ideas on how to automate my entry. The only part I'm struggling with is how to handle a device that is removed from a client site, but then two months later put in at another site with the same IP. I am not for sure yet if just renaming the host to a historical name, and allowing the creation of a new host with the same name as previous ( for some of the help desk guys that are used to the old namming convention) would be a good idea. How does cacti handle naming convention of the RRD's, would it detect that for example site_10.0.0.1(sm).rrd exists and then would name the new one site_10.0.0.1(sm)-2.rrd. These are a few things I will need to play with.
Also I am thinking that I will write this in nothing but PHP and use a cronjob to sync up cacti with the new devices. Or can I translate the cli functions I want into Python because it appears to be 99% DB UPDATE/ADD/DROP.
Thank you again for the reply's
Also I am thinking that I will write this in nothing but PHP and use a cronjob to sync up cacti with the new devices. Or can I translate the cli functions I want into Python because it appears to be 99% DB UPDATE/ADD/DROP.
Thank you again for the reply's
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I seriously doupt that. However, it depends on the version of Cacti you are running. There were some bad bugs in the early automation. Had nothing to do with Perl/PHP/Python. It was bad code. PHP is one of the richest and most broadly supported languages I know from the structured (old man world) to the OO.swebster wrote:Also I am thinking that I will write this in nothing but PHP and use a cronjob to sync up cacti with the new devices. Or can I translate the cli functions I want into Python because it appears to be 99% DB UPDATE/ADD/DROP.
TheWitness
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Of course, there is nothing wrong with what you have done. I'm just speaking to the PHP vs. the crowd issue.
TheWitness
TheWitness
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?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
The main downside is that you take on the burden of tracking any Cacti database schema changes as the software evolves.TheWitness wrote:Of course, there is nothing wrong with what you have done. I'm just speaking to the PHP vs. the crowd issue.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Who is online
Users browsing this forum: No registered users and 2 guests