Sebastian Harl | 1 Aug 2010 21:39
Gravatar

Re: Problems compiling collectd with java support

Hi,

On Fri, Jul 30, 2010 at 05:38:59PM +0100, Paul Miles wrote:
> I'm wondering if you can help, I'm trying to compile collectd-4.10.1 
> with java support and i'm getting errors about libjvm  no (jar not found).

Looks like configure fails to find the program `jar'. configure looks
for that in $JAVA_HOME only. However, you can specify JAR=/path/to/jar
as an additional argument to configure.

HTH,
Sebastian

--

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

_______________________________________________
collectd mailing list
collectd@...
http://mailman.verplant.org/listinfo/collectd
Cristian Leonte | 2 Aug 2010 14:30
Picon

collectd rrd values

Hi all,


i just started using collectd and i think its a great piece of software :), on question about rrd parameters, its there a way to store rrd data for a longer period? let's say that i wan to keep cpu  data for 10 sec interval for 6-12 months. Its there a way to configure this?

Cheers,
Cristi


_______________________________________________
collectd mailing list
collectd@...
http://mailman.verplant.org/listinfo/collectd
Denis Melnikov | 2 Aug 2010 17:15

Does collectd's regex match end of a line?

Hi, all!
Using tail plugin I want to speed up regex matching via anchoring to
end-of-line with '$'.
But as I can see, the plugin evaluates '$' sign as something else, maybe
literal '$'.
Is it possible to use '$' sign as anchor to end-of-line?
I.e.:

Regex " 200 ([0-9]+\\.[0-9]+)$"

(This is response time for successful requests (HTTP/200) to nginx)

Sincerely,
Denis
Jason Dixon | 2 Aug 2010 18:08
Favicon

Register now for Surge 2010

Registration for Surge Scalability Conference 2010 is open for all
attendees!  We have an awesome lineup of leaders from across the various
communities that support highly scalable architectures, as well as the
companies that implement them.  Here's a small sampling from our list of
speakers:

John Allspaw, Etsy
Theo Schlossnagle, OmniTI
Rasmus Lerdorf, creator of PHP
Tom Cook, Facebook
Benjamin Black, fast_ip
Artur Bergman, Wikia
Christopher Brown, Opscode
Bryan Cantrill, Joyent
Baron Schwartz, Percona
Paul Querna, Cloudkick

Surge 2010 focuses on real case studies from production environments;
the lessons learned from failure and how to re-engineer your way to a
successful, highly scalable Internet architecture.  The conference takes
place at the Tremont Grand Historic Venue on Sept 30 and Oct 1, 2010 in
Baltimore, MD.  Register now to enjoy the Early Bird discount and
guarantee your seat to this year's event!

http://omniti.com/surge/2010/register

Thanks,

--

-- 
Jason Dixon
OmniTI Computer Consulting, Inc.
jdixon@...
443.325.1357 x.241
Florian Forster | 4 Aug 2010 13:29
Favicon

Re: [PATCH] Add redis plugin.

Hi Andres,

On Fri, Jul 30, 2010 at 04:36:38PM +0200, Andres J. Diaz wrote:
> This commit adds a new redis plugin, which connect to a number of
> redis server and get information about their status, using the
> libcredis > 0.2.2 library.

thank you very much for your patch :) I've pulled the version from
Github. Is that the same as the attached patch?

I've rebased the commit to my master branch. Also, I've applied two
changes: Some compilation fixes (typos in the Makefile and the POD) and
I've re-indented whitespace. I'm sorry about the re-indenting, but I
felt it'd be best to do that as soon as possible.

I pushed my changes to the "ad/redis" branch on Github. It'd be great if
you could take a look and hopefully catch my mistakes ;)

Regards,
—octo
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
_______________________________________________
collectd mailing list
collectd@...
http://mailman.verplant.org/listinfo/collectd
Florian Forster | 4 Aug 2010 14:53
Favicon

Re: size of rrd's

Hi Patrick,

On Mon, Jul 19, 2010 at 09:09:08AM +0200, Patrick Matula wrote:
> The rrd files have a fix size. But where is it?

the size of the file depends on the parameters passed to RRDtool when
creating the database file. The default RRD files created by collectd
typically are about 150 kByte in size.

HTH,
—octo
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
_______________________________________________
collectd mailing list
collectd@...
http://mailman.verplant.org/listinfo/collectd
Florian Forster | 4 Aug 2010 14:54
Favicon

Re: FreeBSD interval?

Hi Denis,

On Tue, Jul 20, 2010 at 05:14:17PM +0400, Denis Melnikov wrote:
> 'nan' marks intervals when I changed Interval to 80. So 70 is default
> and the only available one, isn't it?

the interval setting is also stored in the RRD files when they are
created. Is it not changes however, if you change the interval setting
to something else later.

If you change the interval in the collectd config, you have to delete
all the RRD files so they are re-created with the correct settings.

Regards,
—octo
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
_______________________________________________
collectd mailing list
collectd@...
http://mailman.verplant.org/listinfo/collectd
Florian Forster | 4 Aug 2010 14:58
Favicon

Re: plugin zfs_arc don't graph

Hi Vincent,

On Tue, Jul 27, 2010 at 05:38:00PM +0200, Vincent Kwiatkowski wrote:
> No problem during compilation "zfs_arc......yes"

> Jul 27 15:11:31 PA-OFC-SRV-UAT-2 collectd[28056]: [ID 702911 daemon.notice] uc_update: Value too
old: name = PA-OFC-SRV-UAT-2/interface/if_octets-mac; value time = 1280236291; last cache update = 1280236291;

this error message has nothing to do with the "zfs_arc" plugin, but with
the "interface" plugin. You can resolve it by ignoring the interface
called "mac", that for some reasons is reported multiple times under
certain versions of Solaris. You can do this using the "Interface" and
"IgnoreSelected" options of the "interface" plugin, which are documented
in the collectd.conf(5) manual page.

Do you have a directory named "zfs_arc" somewhere beneath the RRD data
directory? You can use find(1) to look for it, for example:

  $ find /var/lib/collectd/rrd -name zfs_arc -type d

Regards,
—octo
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
_______________________________________________
collectd mailing list
collectd@...
http://mailman.verplant.org/listinfo/collectd
Florian Forster | 4 Aug 2010 17:26
Favicon

Re: AIX: WPAR and cpu patchs.

Hi Manuel,

On Tue, Jul 20, 2010 at 08:18:12PM +0200, Manuel Luis Sanmartín Rozada wrote:
> The wpar patches are for a plugin to collect cpu, load and memory from
> Workload Partitioning in AIX. It was tested with system WPAR in
> aix 6.1.

thank you very much for your patches :) I pulled them into my Git
repository and pushed them to Github [0].

I did some changes to the code, but couldn't test them because I don't
have an AIX machine around. It'd be great if you could tell me whether
it still works or not, so I can pull the changes into the master branch.

Regards,
—octo

[0] <http://github.com/octo/collectd/commits/ms/wpar>
--

-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
_______________________________________________
collectd mailing list
collectd@...
http://mailman.verplant.org/listinfo/collectd
Hakon | 5 Aug 2010 16:37
Favicon

[PATCH 1/2] Add collectd-flush command line utility.

collectd-flush is a small command-line utility which uses libcollectdclient 
to flush collectd through the unixsock plugin. As far as I know, there is 
no easy way to work with unix sockets from the shell, so if someone 
wanted to flush collectd without this program, they would need to do it 
through some other language (or restart the deamon).

I am no C wizard, so please bear with me if I have
done something a stupid way. :)
The code is based on/inspired by collectd-nagios.

If this message is not properly encoded as utf-8, something wrong must have 
happened with my mailer. If that's the case, I'm sorry.  The only non-ascii character
in the patch is the second character of my name, which is an &aring;.

Signed-off-by: Håkon J Dugstad Johnsen <hakon-dugstad.johnsen@...>
---
 src/collectd-flush.c   |  175 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/collectd-flush.pod |   71 +++++++++++++++++++
 2 files changed, 246 insertions(+), 0 deletions(-)
 create mode 100644 src/collectd-flush.c
 create mode 100644 src/collectd-flush.pod

diff --git a/src/collectd-flush.c b/src/collectd-flush.c
new file mode 100644
index 0000000..c43ae09
--- /dev/null
+++ b/src/collectd-flush.c
 <at>  <at>  -0,0 +1,175  <at>  <at> 
+/**
+ * collectd-flush - src/collectd-flush.c
+ * Copyright (C) 2010 Håkon J Dugstad Johnsen 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; only version 2 of the License is applicable.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ * Authors:
+ *   Håkon J Dugstad Johnsen <hakon-dugstad.johnsen at telenor.com>
+ **/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <getopt.h>
+#include "libcollectdclient/client.h"
+
+extern char *optarg;
+
+static int flush (
+    const char *address, 
+    const char *plugin, 
+    const char *ident_str, 
+    int timeout) 
+{
+  lcc_connection_t *connection;
+  lcc_identifier_t ident;
+
+  // Pointer which is passed to lcc_flush.
+  //Either a null pointer or it points to ident
+  lcc_identifier_t *identp; 
+  int status;
+
+  connection = NULL;
+  status = lcc_connect(address, &connection);
+  if (status != 0)
+  {
+		fprintf (stderr, "ERROR: Connecting to daemon at %s failed: %s.\n",
+				address, strerror (errno));
+		return 1;
+	}
+
+  identp = NULL;
+  if (ident_str != NULL && *ident_str != '\0') {
+    identp = &ident;
+    status = lcc_string_to_identifier (connection, &ident, ident_str);
+    if (status != 0) {
+      fprintf (stderr, "ERROR: Creating and identifier failed: %s.\n",
+          lcc_strerror(connection));
+      LCC_DESTROY (connection);
+
+      return 1;
+    }
+  }
+
+  status = lcc_flush (connection, plugin, identp, timeout);
+  if (status != 0) {
+    fprintf (stderr, "ERROR: Flushing failed: %s.\n",
+        lcc_strerror (connection));
+    LCC_DESTROY (connection);
+
+    return 1;
+  }
+
+  LCC_DESTROY (connection);
+
+  return 0;
+}
+
+void usage (const char *name) {
+  fprintf (stderr, "Usage: %s [options]\n"
+      "\n"
+      "Valid options are:\n"
+      "  -h, --help               Display this help message.\n"
+      "  -s, --socket=<socket>    Path to collectd's UNIX socket. Default: /var/run/collectd-unixsock\n"
+      "  -p, --plugin=<plugin>    Plugin to flush _to_ (not from). Example: rrdtool\n"
+      "  -i, --identifier=<identifier>\n"
+      "                           Only flush data specified by <identifier>, which has the format: \n"
+      "\n"
+      "                             [<hostname>/]<plugin>[-<plugin_instance>]/<type>[-<type_instance>]\n"
+      "\n"
+      "                           Hostname defaults to the local hostname if omitted.\n"
+      "                           No error is returned if the specified identifier does not exist.\n"
+      "                           Examples: uptime/uptime\n"
+      "                                     somehost/cpu-0/cpu-wait\n"
+      "  -t, --timeout=<timeout>  Only flush values older than this timeout.\n", name);
+}
+
+/*
+ * Count how many occurences there are of a char in a string.
+ */
+int charoccurences (const char *str, char chr) {
+  int count = 0;
+  while (*str != '\0') {
+    if (*str == chr) {
+      count++;
+    }
+    str++;
+  }
+
+  return count;
+}
+
+int main (int argc, char **argv) {
+  char address[1024] = "unix:/var/run/collectd-unixsock";
+  char *plugin = NULL;
+  char ident_str[1024] = "";
+  int timeout = -1;
+  char hostname[1024];
+  char c;
+
+  static struct option long_options[] = 
+    {
+      {"help", no_argument, 0, 'h'},
+      {"socket", required_argument, 0, 's'},
+      {"plugin", required_argument, 0, 'p'},
+      {"identifier", required_argument, 0, 'i'},
+      {"timeout", required_argument, 0, 't'}
+    };
+  int option_index = 0;
+
+ 
+  while ((c = getopt_long (argc, argv, "s:p:i:ht:", long_options, &option_index)) != -1) {
+    switch (c) {
+      case 's':
+        snprintf (address, sizeof (address), "unix:%s", optarg); 
+      case 'p':
+        plugin = optarg;
+        break;
+      case 'i':
+        if(charoccurences(optarg, '/') == 1) {
+          // The user has omitted the hostname part of the identifier 
+          // (there is only one '/' in the identifier)
+          // Let's add the local hostname
+          if(gethostname(hostname, sizeof(hostname)) != 0) {
+            fprintf (stderr, "Could not get local hostname: %s", strerror(errno));
+            return 1;
+          }
+          // Make sure hostname is zero-terminated
+          hostname[sizeof(hostname)-1] = '\0'; 
+          snprintf (ident_str, sizeof (ident_str), "%s/%s", hostname, optarg);
+          // Make sure ident_str is zero terminated
+          ident_str[sizeof(ident_str)-1] = '\0'; 
+        } else {
+          strncpy(ident_str, optarg, sizeof (ident_str));
+          // Make sure identifier is zero terminated
+          ident_str[sizeof(ident_str)-1] = '\0'; 
+        }
+        break;
+      case 't':
+        timeout = atoi (optarg);
+        break;
+      case 'h':
+        usage (argv[0]);
+        return 0;
+      default:
+        usage (argv[0]);
+        return 1;
+    }
+  }
+
+  return flush(address, plugin, ident_str, timeout);
+}
diff --git a/src/collectd-flush.pod b/src/collectd-flush.pod
new file mode 100644
index 0000000..1911005
--- /dev/null
+++ b/src/collectd-flush.pod
 <at>  <at>  -0,0 +1,71  <at>  <at> 
+=head1 NAME
+
+collectd-flush - Small command line utility to flush collectd
+
+=head1 SYNOPSIS
+
+collectd-flush I<[options]>
+
+=head1 DESCRIPTION
+
+This small command line utitilty uses C<libcollectdclient> to flush collectd 
+through a socket from the L<unixsock plugin>. Useful if you want to be sure 
+you have the latest values in your RRD files before graphing them or copying 
+them somewhere else.
+
+=head1 ARGUMENTS AND OPTIONS
+
+The following arguments and options are understood by collectd-flush. The order
+of the arguments generally doesn't matter, as long as no argument is passed 
+more than once.
+
+=over 4
+
+=item B<-h>, B<--help>
+
+Display information about the options.
+
+=item B<-s>, B<--socket=>I<socket>
+
+Path to the UNIX socket opened by collectd's C<unixsock plugin>. 
+Default: /var/run/collectd-unixsock
+
+=item B<-p>, B<--plugin=>I<plugin>
+
+Plugin to flush I<to>. Example: B<rrdtool>.
+
+=item B<-i>, B<--identifier=>I<identifier>
+
+If this option is present, only the data specified by I<identifier> will be flushed.
+I<identifier> has the following format:
+
+[I<hostname>/]I<plugin>[-I<plugin_instance>]/I<type>[-I<type_instance>]
+
+Examples:
+ somehost/cpu-0/cpu-idle
+ uptime/uptime
+ otherhost/memory/memory-used
+
+Hostname defaults to the local hostname if omitted. No error is returned if the
+specified identifier does not exist (this is a limitation in the 
+C<libcollectdclient> library).You can only specify one identifier each time you
+run this program (even though L<collectd-unixsock(5)> supports multiple
+identifiers).
+
+=item B<-t>, B<--timeout=>I<timeout>
+
+Only flush values older than I<timeout>.
+
+=back
+
+=head1 SEE ALSO
+
+L<collectd(1)>
+L<collectd.conf(5)>
+L<collectd-unixsock(5)>
+
+=head1 AUTHOR
+
+Håkon J Dugstad Johnsen E<lt>hakon-dugstad.johnsenE<nbsp>atE<nbsp>telenor.comE<gt>
+
+=cut
--

-- 
1.7.0.4

Gmane