[collectd] Re: New Plugin: apcups

Florian Forster octo at verplant.org
Thu May 18 22:41:27 CEST 2006


Hi Anthony,

On Thu, May 18, 2006 at 11:14:40AM -0400, Anthony Gialluca wrote:
> I have created a plugin to gather information from an APC UPS daemon
> (apcupsd usually on port 3551).  Please find attached a patch with the
> changes I made to "collection.cgi", "Makefile.in", "collectd.conf and
> "configure.in".  And a file "apcups.c" to be included in the 'src'
> directory. I have run it for a few days with no problems...

thank you very much for you contribution, I've added the file to the
repository but not applied the changes to the build system yet. I'll do
that tomorrow..

> If this is an inappropriate method to submit a plugin, then I
> apologize in advance and would appreciate a pointer to a more
> appropriate method.

Sending the patches to the mailinglist would have been fine, too, but
any way is okay with me (unless it involves Word documents ;)

> A few Notes:
(mostly included so the guys on the mailinglist get to read them, too ;)

> 1. All credit goes to the apcupsd programmers and to yourself and the
> collectd programmers. All that I did was use the code available and
> hacked and glued it till it worked.

> 2. I would be hesitant to use this on a 'production' or 'critical'
> system before it has been tested by a wider user base. Or until the
> code has  been examined for errors. Any errors in the code should be
> blamed on me.

> 3. The apcups.c can be compiled to test connectivity to apcupsd
> daemon.  For example: "gcc -DAPCMAIN -o apcups apcups.c". It will
> connect to localhost on port 3551 and print out the values available
> from the apcupsd.
> 
> 4. I have used it on a system with a SmartUPS-1000. I have no other
> ups's to test against.

As always: Any feedback appreciated ;)

> 5. The default values I have used may or may not be appropriate for
> others in other countries. (I am in the USA). I tried to pick
> reasonable default so as not to be the 'typical American', however I
> don't have any opportunity to travel. >sigh<
> 
> 6. The apcups code was hacked out of apcupsd-3.12.3  This should be
> the latest.
> 
> In conclusion, it allows me to trend some very useful information with
> regards to line voltage/freq. And the performance of my UPS. I hope
> that others will find this useful and can improve on what I have
> provided.

Definitely ;) I'll clean up the auxiliary functions since collectd
provised similar functions with only slightly different prototype..

I have removed the attached files. You can find the new plugin in the
svn repository:
<http://subversion.verplant.org/collectd/trunk/src/apcups.c>

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2567 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20060518/6d5a9230/smime.bin


More information about the collectd mailing list