Super Add plugin

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
kuma3
Posts: 25
Joined: Tue Oct 02, 2007 1:17 pm

Super Add plugin

Post by kuma3 »

I don't know how others add dozen of hosts quickly, but for me, it's

- Add device, select the right host template.
- Go into each new host and hit 'create graph' link, select all graph and click create. Then repeat dozen times.

If I added a new graph to a host template, then I need to go into each host using that template, and do the create a graph all over again. I think there is some patch to speed it up, but I haven't been keeping up with it.

Then there is this thing with creating data input method's output fields. Once a while, we get a new input method with 39 output fields, adding them is quiet a pain. Although we don't do it often, but every time when I need to, I moan and whine... :wink:

So, I have created Super Add(sadd). Basically, it's a web UI for the cli/ commands add_graph.php and add_host.php.

Super add graphs = select the host(s), select the graph template(s) to add, hit create, and graph will be created.

Super add devices = type a list of host names, select host template, pick snmp string, and hit create. It assume a couple things such as "SNMP" for ping method, SNMP version 2, and couple other stuff. Please look at the code and make change to fit your own environment.

Super add data inputs = Quickly add data output fields for a given data input method. One output per line. Format can either be "name:friendly name" or just "name" in which friendly name is same as "name".

This thing is created with my own environment's requirement in mind and please use with caution. I am not responsible for its result. Suggestion and feature request is welcome. However, I would like to stress that this is created for our new guys who never touch Cacti before so they can add stuff to Cacti easily. If we start to add too many selection and drop down boxes, it might be more confusing to them.

Installation is the same as other plugin, just untar it to plugin directory, add it to your global.php and it should show up. It uses the same auth realm as create graph, so if you can create graph, the menu should show up. This is written for 0.8.7, didn't test it with older version.


thanks,
mark
Attachments
sadd.tar.gz
sadd release 1
(4.48 KiB) Downloaded 650 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sounds very interesting. But no time ATM for testing here.
Thank you for publishing this.
Reinhard
BIGHard
Cacti User
Posts: 66
Joined: Mon May 28, 2007 7:32 pm

Post by BIGHard »

i did test it. great job!

although i did change it to allow selecting only hosts from a host template.
Attachments
sadd.txt
(5.27 KiB) Downloaded 604 times
kuma3
Posts: 25
Joined: Tue Oct 02, 2007 1:17 pm

Post by kuma3 »

BIGHard wrote:i did test it. great job!

although i did change it to allow selecting only hosts from a host template.
Thanks. I ran into a problem with your modification, it complains

getHostsByTemplate function doesn't exist. Is that your own custom function?
frdrk
Cacti User
Posts: 55
Joined: Fri Jul 06, 2007 2:27 pm

Post by frdrk »

kuma3 wrote:
BIGHard wrote:i did test it. great job!

although i did change it to allow selecting only hosts from a host template.
Thanks. I ran into a problem with your modification, it complains

getHostsByTemplate function doesn't exist. Is that your own custom function?
I get this problem with your original tgz also.


Warning: include_once(/var/www/cacti/lib/api_automation_tools.php) [function.include-once]: failed to open stream: No such file or directory in /var/www/cacti/plugins/sadd/sadd_devices.php on line 8
Warning: include_once() [function.include]: Failed opening '/var/www/cacti/lib/api_automation_tools.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/cacti/plugins/sadd/sadd_devices.php on line 8
Fatal error: Call to undefined function getHostTemplates() in /var/www/cacti/plugins/sadd/sadd_devices.php on line 21
kuma3
Posts: 25
Joined: Tue Oct 02, 2007 1:17 pm

Post by kuma3 »

frdrk wrote:
kuma3 wrote:
BIGHard wrote:i did test it. great job!

although i did change it to allow selecting only hosts from a host template.
Thanks. I ran into a problem with your modification, it complains

getHostsByTemplate function doesn't exist. Is that your own custom function?
I get this problem with your original tgz also.


Warning: include_once(/var/www/cacti/lib/api_automation_tools.php) [function.include-once]: failed to open stream: No such file or directory in /var/www/cacti/plugins/sadd/sadd_devices.php on line 8
Warning: include_once() [function.include]: Failed opening '/var/www/cacti/lib/api_automation_tools.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/cacti/plugins/sadd/sadd_devices.php on line 8
Fatal error: Call to undefined function getHostTemplates() in /var/www/cacti/plugins/sadd/sadd_devices.php on line 21
frdrk,

The library such as api_automation_tools.php comes with cacti-0.8.7a.

mark
bodo.bach
Posts: 9
Joined: Wed Jul 02, 2008 7:35 am

Error while adding devices with sadd

Post by bodo.bach »

Hi, many thanx for your plugin.

My config is cactiEZ 0.4 with 0.87b

Global Plugin Settings (settings - v0.5)
Thresholds (thold - v0.4)
Device Monitoring (monitor - v0.8.2)
NetTools for Cacti (NetTools - v0.1.5)
Syslog Monitoring (syslog - v0.5.2)
Device Tracking (mactrack - v1.1)
RRD File Cleaner (RRD Cleaner - v0.36)
Update Checker (update - v0.4)
Host Info (hostinfo - v0.2)
Error Images (errorimage - v0.1)
Create Aggregate Graphs (aggregate - v0.66)
Documents (docs - v0.1)
PHP Network Managing (PHP Network Managing - v0.6)uptime
SuperLinks (superlinks - v0.72)
passw
Read-only Devices Tab (devices - v0.4)
memorize plugin for cacti (memorize - v0.2)
banner and instant messaging (banner - v0.2)
Device Status Monitoring (Status - v4)
Poller Performance Report (pollperf - v0.32)
SNMP-Tools (mySNMP - v0.1)
sadd
Cacti-ReportIt (reportit - v0.6.1)

when i am adding devices i get following error and its not adding devices:

Notice: Undefined index: id in /var/www/html/plugins/manage/setup.php on line 466

Notice: Undefined index: id in /var/www/html/plugins/manage/setup.php on line 469


You have an idea to fix this ?

Thanx for a answer

Bodo
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests