author | Florian Forster <octo@noris.net> | |
Tue, 30 Oct 2007 16:19:04 +0000 (16:19 +0000) | ||
committer | Florian Forster <octo@noris.net> | |
Tue, 30 Oct 2007 16:19:04 +0000 (16:19 +0000) |
Conflicts:
src/collectd-snmp.pod
src/collectd-snmp.pod
src/apcups.c | patch | blob | history | |
src/collectd-snmp.pod | patch | blob | history | |
src/collectd.h | patch | blob | history | |
src/hddtemp.c | patch | blob | history | |
src/mbmon.c | patch | blob | history | |
src/ntpd.c | patch | blob | history | |
src/plugin.h | patch | blob | history | |
src/types.db | patch | blob | history |
diff --git a/src/apcups.c b/src/apcups.c
index 4f0bdfa69f8b64593e6b669a0c919c91cf89cdfb..174febe45f5a5346124d7ad97ec83890cc964bda 100644 (file)
--- a/src/apcups.c
+++ b/src/apcups.c
if (status != 0)
{
char errbuf[1024];
- DEBUG ("getaddrinfo failed: %s",
+ INFO ("getaddrinfo failed: %s",
(status == EAI_SYSTEM)
? sstrerror (errno, errbuf, sizeof (errbuf))
: gai_strerror (status));
if (status != 0) /* `connect(2)' failed */
{
char errbuf[1024];
- DEBUG ("connect failed: %s",
+ INFO ("connect failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
close (sd);
return (-1);
diff --git a/src/collectd-snmp.pod b/src/collectd-snmp.pod
index 001925453c27897a9c5645b6dd3fabcf645668cd..ea490293f17ab21990536ed06eb533056edd1d77 100644 (file)
--- a/src/collectd-snmp.pod
+++ b/src/collectd-snmp.pod
Version 1
Community "community_string"
Collect "std_traffic"
- Inverval 120
+ Interval 120
</Host>
<Host "some.server.mydomain.org">
Address "192.168.0.42"
Since the aim of the C<snmp plugin> is to provide a generic interface to SNMP,
it's configuration is not trivial and may take some time.
-Since the C<Net-SNMP> library is used you can use all the environment
-variables that are interpreted by that package. See L<snmpcmd(1)> for more
-details.
+Since the C<Net-SNMP> library is used you can use all the environment variables
+that are interpreted by that package. See L<snmpcmd(1)> for more details.
There are two types of blocks that can be contained in the
C<E<lt>PluginE<nbsp>snmpE<gt>> block: B<Data> and B<Host>:
=item B<Version> B<1>|B<2>
-Set the SNMP version to use. When giving B<2> version 2c is actually used.
+Set the SNMP version to use. When giving B<2> version C<2c> is actually used.
Version 3 is not supported by this plugin.
=item B<Community> I<Community>
diff --git a/src/collectd.h b/src/collectd.h
index 2849db27234002a6cae6f4b3bb193f2db657b0e6..9951d8a91013d929bc831a4e40ad49b9bce08893 100644 (file)
--- a/src/collectd.h
+++ b/src/collectd.h
#define PLUGINDIR PREFIX "/lib/" PACKAGE_NAME
#endif
-#define MODE_SERVER 0x01
-#define MODE_CLIENT 0x02
-#define MODE_LOCAL 0x04
-#define MODE_LOG 0x08
-
#ifndef COLLECTD_GRP_NAME
# define COLLECTD_GRP_NAME "collectd"
#endif
diff --git a/src/hddtemp.c b/src/hddtemp.c
index 0432de73adc825c9ac161bc3ea5dc5a5800f68a9..0a93920b99e4ce7e42c3d8a0b06c6fc91373c8e8 100644 (file)
--- a/src/hddtemp.c
+++ b/src/hddtemp.c
if (connect (fd, (struct sockaddr *) ai_ptr->ai_addr, ai_ptr->ai_addrlen))
{
char errbuf[1024];
- DEBUG ("hddtemp: connect (%s, %s): %s", host, port,
+ INFO ("hddtemp: connect (%s, %s): %s", host, port,
sstrerror (errno, errbuf, sizeof (errbuf)));
close (fd);
fd = -1;
diff --git a/src/mbmon.c b/src/mbmon.c
index 384ecb5e6a5cda48d376ebea8b5aad3882a1143b..bad1a3884d86596b2f5600241ae83c5ee543b69c 100644 (file)
--- a/src/mbmon.c
+++ b/src/mbmon.c
if (connect (fd, (struct sockaddr *) ai_ptr->ai_addr, ai_ptr->ai_addrlen))
{
char errbuf[1024];
- DEBUG ("mbmon: connect (%s, %s): %s", host, port,
+ INFO ("mbmon: connect (%s, %s): %s", host, port,
sstrerror (errno, errbuf,
sizeof (errbuf)));
close (fd);
diff --git a/src/ntpd.c b/src/ntpd.c
index 63b037a6440eb8006027dac12b8355cde0e24b5b..9e09f81982291dc3b60b3040e93eb4829838a342 100644 (file)
--- a/src/ntpd.c
+++ b/src/ntpd.c
if (status < 0)
{
char errbuf[1024];
- DEBUG ("recv(2) failed: %s",
+ INFO ("recv(2) failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
DEBUG ("Closing socket #%i", sd);
close (sd);
diff --git a/src/plugin.h b/src/plugin.h
index 4ca6c771f16c8d87f050c499b4f367cf85b6b970..7692ebdb0377eb3212a4c3a2da9931c837202d46 100644 (file)
--- a/src/plugin.h
+++ b/src/plugin.h
#define WARNING(...) plugin_log (LOG_WARNING, __VA_ARGS__)
#define NOTICE(...) plugin_log (LOG_NOTICE, __VA_ARGS__)
#define INFO(...) plugin_log (LOG_INFO, __VA_ARGS__)
-#define DEBUG(...) plugin_log (LOG_DEBUG, __VA_ARGS__)
+#if COLLECT_DEBUG
+# define DEBUG(...) plugin_log (LOG_DEBUG, __VA_ARGS__)
+#else /* COLLECT_DEBUG */
+# define DEBUG(...) /* noop */
+#endif /* ! COLLECT_DEBUG */
/* TODO: Move plugin_{complain,relief} into `utils_complain.[ch]'. -octo */
void plugin_complain (int level, complain_t *c, const char *format, ...);
diff --git a/src/types.db b/src/types.db
index efaea0ecd7163658ed1b4656fe81bcd063405cae..560354c16a50a170dbdaee4f60c45c01bff62198 100644 (file)
--- a/src/types.db
+++ b/src/types.db
frequency frequency:GAUGE:0:U
frequency_offset ppm:GAUGE:-1000000:1000000
gauge value:GAUGE:U:U
-humitidy value:GAUGE:0:100
+humidity value:GAUGE:0:100
if_collisions value:COUNTER:0:4294967295
if_dropped rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295
if_errors rx:COUNTER:0:4294967295, tx:COUNTER:0:4294967295