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);
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>
#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
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;
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);
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);
#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, ...);
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