SOAP for cacti

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
arim
Posts: 4
Joined: Fri Jul 19, 2002 9:02 am
Location: Monterrey, Mexico
Contact:

SOAP for cacti

Post by arim »

I will use cacti in the company I'm working on. At "The Boss" request i will make a SOAP interface to cacti. :D
I have experience with Python-SOAP implementation but I think I will pick a PHP-based one for this (I have not yet choose any).

Any Ideas or hints? It would be a nice feature to cacti anyway. :wink:
I had a look at sourceforge and no "catci-dev" list found :cry:

arim
disclaimer:
sorry, English is not my mother language :-?
LiquidKernel
Posts: 8
Joined: Fri Sep 20, 2002 11:18 am
Location: San Francisco, CA
Contact:

Post by LiquidKernel »

If you want Cacti to access a SOAP service, I would just do it through a data input script written in PHP.

I highly recommend you give this a try:
http://phpsoaptoolkit.sourceforge.net/phpsoap/

It is a PHP SOAP implementation written in C, so it runs as a module for PHP. This in turn makes it a lot faster than the wrappers written in PHP (run-time PHP vs. compiled C, no contest).

I found it simple to use, and it seems to do SOAP quite well. Granted this is the only time I have worked with SOAP, it still looks good.

Hope this helps!
.: Serge
http://sergio.gfxcafe.com
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Did any of you get this working? I know it's an old post, but we need to add this as a base feature.

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?
asmpro
Posts: 2
Joined: Mon Mar 12, 2007 11:21 am

Post by asmpro »

Does it exist or is there any plan to create additional interface for adding new graphs, deleting graphs ... (for example: command line, SOAP)?

Read on only if there is no other than Web Interface to cacti. If there is, I thank you in advance for pointing it out for me.

We need to add a great number of graphs to cacti. That's why we started thinking of doing it automatically.
The most attractive way of doing seemed to be writing SOAP Service, running inside cacti, offering some of the cacti functions to the external caller (whether this is Java, Perl, C or any other programming language supporting SOAP Client RPC calls). Since we need these functions accessible to Java programming language, we are planning to write Java SOAP Client.
If all goes well, we plan to release sources of both SOAP Service (written in PHP) and SOAP Client (written in Java) to cacti developer community for future adaptations to the future cacti releases.
We might offer some of our development resources for the necesary updates and for adding additional exposed cacti functions.

What do you think about this idea?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

asmpro wrote:Does it exist or is there any plan to create additional interface for adding new graphs, deleting graphs ... (for example: command line, SOAP)?

Read on only if there is no other than Web Interface to cacti. If there is, I thank you in advance for pointing it out for me.

We need to add a great number of graphs to cacti. That's why we started thinking of doing it automatically.
The most attractive way of doing seemed to be writing SOAP Service, running inside cacti, offering some of the cacti functions to the external caller (whether this is Java, Perl, C or any other programming language supporting SOAP Client RPC calls). Since we need these functions accessible to Java programming language, we are planning to write Java SOAP Client.
If all goes well, we plan to release sources of both SOAP Service (written in PHP) and SOAP Client (written in Java) to cacti developer community for future adaptations to the future cacti releases.
We might offer some of our development resources for the necesary updates and for adding additional exposed cacti functions.

What do you think about this idea?
I'd like something like this too, but for different reasons. There is definitely some benefit for plugin authors not needing to delve into the interior of Cacti too much. For example, in the Weathermap editor, there's a giant SQL query that is supposed to pull out the list of Data Sources, so a user can pick them. It mostly works, but not quite. I made it by trail and error with my own cacti database. If there were a SOAP interface to retrieve that list then (a) I wouldn't be screwing around inside the Cacti database (better compartmentalization), (b) it'd be right, and (c) it'd probably stay right in the next release of Cacti too. I would imagine that other plugins could benefit from a more formal interface too.

The implication though, is that you separate the data-layer and the UI in cacti, so that Cacti itself has this separation, which is no mean feat, especially in a project with a growing todo list.

The kind of thing I'm thinking of is RT, where there's an object hierarchy for the actual data, and then a couple of different UIs (mail, REST, web) on top, all calling the same underlying API.

Or, of course, it's a quick fix, and that's cool too, but then it's just moving the problem. :-)
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!)
asmpro
Posts: 2
Joined: Mon Mar 12, 2007 11:21 am

Post by asmpro »

I would really like to see some response from active developers or people responsible for new feature approval to respond to this topic ASAP. We are already starting with implementation of the project.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

It needs to be written. If you are prepared to start, please review the trunk SVN (0.9) and describe "how" you would implement this before you start actually doing the work. Aka, provide you design document for approval.

Thanks for the help.

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?
glista
Posts: 10
Joined: Mon Mar 19, 2007 12:43 am

SOAP for cacti

Post by glista »

We are interested in implementing SOAP service in Cacti. Mostly to automate adding a lot of data input methods, graphs, devices, trees... via SOAP. Given the maintenance issues, do you think it is prudent to try and use the Model-View-Control concept of web application?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Hmm, I thought it was to 'gather' information from other web applications for graphing. Controlling Cacti via SOAP. We'll it's not too clean in 0.8.6, a good start are the automation tools. It would not be too much of a strech though to write a SOAP service to handle request, authenticate your users and then accept commands such as you describe.

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?
glista
Posts: 10
Joined: Mon Mar 19, 2007 12:43 am

SOAP for Cacti Version 0.8.7b

Post by glista »

Cacti Soap-server:
http://forums.cacti.net/download.php?id=12098

Cacti Soap-client for adding graphs, devices, trees:
http://forums.cacti.net/download.php?id=12097


Tools for adding multiple hosts, graphs, trees via Cacti SOAP calls also for migrating from MRTG to Cacti:
http://forums.cacti.net/download.php?id=12270
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests