add custom options on host

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
gde
Posts: 13
Joined: Tue Oct 12, 2010 7:19 am

add custom options on host

Post by gde »

Hello,

I've looked around quickly using the search of the forum but didn't find a topic on this.

I think it would be nice to be able to add custom options on a device. I'm in a situation where I need to get data after filling in some credentials and specify a certain port number. I've found a dataquery for parsing data through jmxproxy but all these informations are hardcoded in the script… needless de say it doesn't scale well when you have lots of devices to monitor with different usernames/password/port.

if I could create my own options where I could add these informations for each devices, I would have been able to call these options as variable in the data query xml file.

what do you guys think ?
|Cacti Version - 0.8.7g||Plugin Architecture - 2.8||Poller Type - Spine|
|os - Debian 5.0.6 | |Web Server - Apache/2.2.11 )|
|PHP - 5.2.6| |MySQL - 5.0.67| |RRDTool - 1.3.1|
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: add custom options on host

Post by gandalf »

First of all, extending the data shown on host edit screen can be done by creating a plugin. Thus, you may either extend the host table (not recommended) or create a new table using the host_id as an index.
Such a plugin will perhaps require to extend the polling process as well to extend data capture. But it's hard to give advice without more information about your case.
R.
gde
Posts: 13
Joined: Tue Oct 12, 2010 7:19 am

Re: add custom options on host

Post by gde »

I admit, I didn't look if anybody created a plugin for it before typing my text. actually, I forgot plugins could be created. I'm not php developper but I'll probably look at it if it doesn't exist.
I'm unexperienced here but don't quite see how the polling process could be affected. All I want is to just create a serie key/value pair that I could reuse on a script query xml file. I'll look into it…

thanks
|Cacti Version - 0.8.7g||Plugin Architecture - 2.8||Poller Type - Spine|
|os - Debian 5.0.6 | |Web Server - Apache/2.2.11 )|
|PHP - 5.2.6| |MySQL - 5.0.67| |RRDTool - 1.3.1|
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: add custom options on host

Post by Howie »

I think I might write this plugin. I have a requirement to keep track of a number of IDs and other custom fields per device (e.g. to choose who to send alerts to).

I think that to use those fields in a query would require patching Cacti though - I don't think any existing hooks allow you to extend that part of Cacti, do they, Gandalf?
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!)
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: add custom options on host

Post by cigamit »

It really depends on how exactly you want to use them, but we do have a hook for "valid_host_fields". Check the top of /include/global_form.php.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests