Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Super Add plugin

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Announcements
Author Message
kuma3



Joined: 02 Oct 2007
Posts: 24

PostPosted: Fri Jan 25, 2008 9:36 pm    Post subject: Super Add plugin Reply with quote

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...

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



sadd.tar.gz
 Description:
sadd release 1

Download
 Filename:  sadd.tar.gz
 Filesize:  4.48 KB
 Downloaded:  229 Time(s)

Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12186
Location: Muenster, Germany

PostPosted: Sat Jan 26, 2008 8:52 am    Post subject: Reply with quote

Sounds very interesting. But no time ATM for testing here.
Thank you for publishing this.
Reinhard
Back to top
BIGHard
Cacti User


Joined: 28 May 2007
Posts: 56

PostPosted: Tue Jan 29, 2008 1:15 pm    Post subject: Reply with quote

i did test it. great job!

although i did change it to allow selecting only hosts from a host template.



sadd.txt
 Description:

Download
 Filename:  sadd.txt
 Filesize:  5.27 KB
 Downloaded:  205 Time(s)

Back to top
kuma3



Joined: 02 Oct 2007
Posts: 24

PostPosted: Wed Jan 30, 2008 2:35 pm    Post subject: Reply with quote

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?
Back to top
frdrk



Joined: 06 Jul 2007
Posts: 41

PostPosted: Fri Feb 01, 2008 3:13 am    Post subject: Reply with quote

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
Back to top
kuma3



Joined: 02 Oct 2007
Posts: 24

PostPosted: Mon Feb 04, 2008 11:40 am    Post subject: Reply with quote

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
Back to top
bodo.bach



Joined: 02 Jul 2008
Posts: 9

PostPosted: Tue Aug 05, 2008 6:53 am    Post subject: Error while adding devices with sadd Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Announcements All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group