[icinga-users] Icinga2 pnp4nagios Performance Data from applied Service

Yuval Freund yuv.freu at gmail.com
Wed Aug 6 13:48:03 CEST 2014


- You said something about a services.conf where services exist which do
not generate any perfdata and therefore rrd files.

services.conf contains the applied service I pasted in my last email, and
ping6, which I also don't seem to get an rrd-file from. The other services
are defined directly under the host, for example -
/etc/icinga2/conf.d/hosts/localhost/users.conf
:


object Service "users" {
  import "generic-service"

  host_name = "localhost"
  check_command = "users"
  vars.sla = "24x7"

  action_url = "/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$'
class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$"
}


The main difference I can see between services that I do get rrd-files
from, and services I do not get rrd-files from, is that the ones which do
not generate any files are applied per rule using "apply Service" from the
main services.conf file, and the ones that do work are defined under the
host per "object Service". I hope that makes my issue a bit clearer.


- It's still a sample config, and shall be revised/modified by your own
strategy

I fully intend to do that, once I get this issue out of the way. It's
easier to debug with configs which are easily replicated, as anyone can
just grab a copy, or create a vagrant instance with those configs. BTW -
your link returned a "page not found" :(


- Run the plugin manually as Icinga 2 would execute it, and post the entire
output.

Sure - where does icinga2 keep the internal command files, such as ping4? I
haven't found any documantation on that, and there's no path
under /etc/icinga2/features-enabled/command.conf . There's no mention of
ping4 in any other config file.


In addition to me debugging this issue, it would be nice to get some
feedback from other users - Has anyone successfully applied and got PNP
data from an "applied" service in icinga2 ?


On Tue, Aug 5, 2014 at 7:07 PM, Michael Friedrich <
michael.friedrich at netways.de> wrote:

>  Am 05.08.2014 18:02, schrieb Yuval Freund:
>
> Hello and thanks for your reply,
>
>  - Can we see the exact configuration?
>
>  Sure, which configuration would you require? Icinga/PNP/rrdcached/.. ?
> Which exact files?
> As I stated in my original post, I used the supplied guide in order to get
> PNP up and running, so all configurations are identical to the ones there.
>
>
> You said something about a services.conf where services exist which do not
> generate any perfdata and therefore rrd files.
>
>
> "pnp only recieves performance data from services which are directly
> configured under the host, but not for services which were applied from
> services.conf ."
>
> I was curious how they would look like.
>
>
>
>  Here's the service configuration, which was included in the .deb package
> from the repo (the only thing added is action_url):
>
>
> It's still a sample config, and shall be revised/modified by your own
> strategy. Find more on best practices on the documentation on that:
> http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics#configuration-best-practice
>
>
>
>
>  apply Service "ping4" {
>   import "generic-service"
>
>    check_command = "ping4"
>   vars.sla = "24x7"
>
>    assign where "linux-servers" in host.groups
>   assign where "windows-servers" in host.groups
>   ignore where host.address == ""
>
>    action_url = "/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$'
> class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$"
> }
>
>
>  And here's a listing of the perfdata/localhost folder, so you could see
> other services are creating and populating rrd-files:
>
>  root at SERVERNAME:/var/lib/pnp4nagios/perfdata/localhost# ll
> total 22188
> drwxrwxr-x 2 nagios nagios     4096 Aug  5 14:17 ./
> drwxr-xr-x 4 nagios nagios     4096 Jul 25 15:32 ../
> -rw-rw-r-- 1 nagios nagios   768224 Aug  5 14:00 apt.rrd
> -rw-rw-r-- 1 nagios nagios     2530 Aug  5 14:16 apt.xml
> -rw-rw-r-- 1 nagios nagios  3067856 Aug  5 14:14 disk.rrd
> -rw-rw-r-- 1 nagios nagios     6915 Aug  5 14:16 disk.xml
> -rw-rw-r-- 1 nagios nagios   768224 Jul 29 00:35 _HOST_.rrd
> -rw-rw-r-- 1 nagios nagios     2455 Jul 29 00:35 _HOST_.xml
> -rw-rw-r-- 1 nagios nagios   768224 Aug  5 14:09 http.rrd
> -rw-rw-r-- 1 nagios nagios     2512 Aug  5 14:16 http.xml
> -rw-rw-r-- 1 nagios nagios 14566016 Aug  5 14:03 icinga.rrd
> -rw-rw-r-- 1 nagios nagios    27147 Aug  5 14:16 icinga.xml
> -rw-rw-r-- 1 nagios nagios  1151496 Aug  5 14:11 load.rrd
> -rw-rw-r-- 1 nagios nagios     3176 Aug  5 14:17 load.xml
> -rw-rw-r-- 1 nagios nagios   384952 Aug  5 13:48 procs.rrd
> -rw-rw-r-- 1 nagios nagios     1874 Aug  5 14:17 procs.xml
> -rw-rw-r-- 1 nagios nagios   384952 Aug  5 13:46 ssh.rrd
> -rw-rw-r-- 1 nagios nagios     1882 Aug  5 14:17 ssh.xml
> -rw-rw-r-- 1 nagios nagios   384952 Aug  5 14:13 swap.rrd
> -rw-rw-r-- 1 nagios nagios     1956 Aug  5 14:16 swap.xml
> -rw-rw-r-- 1 nagios nagios   384952 Aug  5 13:54 users.rrd
> -rw-rw-r-- 1 nagios nagios     1862 Aug  5 14:16 users.xml
>
>
> It doesn't make sense to debug three different locations for "no graph is
> shown"
>
> * Verify which command is being executed given the configuration objects
> * Validate the check plugin manually providing the correct performance data
>
> Only if these points are done, step to npcd/process perfdata. And if their
> logs don't tell anything, dive into rrdtool.
>
>
>
>  - Verify that these check commands and plugins provide valid performance
> data.
>
>  "..even though I can see the performance data under "Service State
> Information" ". Here's what I see under the service ping4 as an example -
> Performance Data:pl=0%;5;15;0 rta=3.1999999999999999e-05s;0.1;0.2;0
>
>
> Run the plugin manually as Icinga 2 would execute it, and post the entire
> output.
>
>
>
>
>  - Hard to tell with that little details you provided.
>
>  "Please let me know if you require any additional details from my end."
> :)
>
>
> I'd remove the wiki guide, and move it to the documentation. I'm not very
> keen on a split mode between the wiki and the docs, as happened with 1.x.
> If you have anything to add to the docs, please send a patch to the issue -
> https://dev.icinga.org/issues/6858
>
>
> http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/addons-plugins#addons-graphing-pnp
>
> regards,
> Michael
>
>
>
>
>
> On Tue, Aug 5, 2014 at 5:44 PM, Michael Friedrich <
> michael.friedrich at netways.de> wrote:
>
>>  Am 05.08.2014 17:17, schrieb Yuval Freund:
>>
>> Hello,
>>
>>  I set up the latest version (2.0.1) of Icinga2 on an Ubuntu 14.04
>> Machine with ClassicUI and pnp4nagios using the official repository.
>> Everything seems to be working, including my integration with the
>> ClassicUI, accept for one issue - pnp only recieves performance data from
>> services which are directly configured under the host, but not for services
>> which were applied from services.conf .
>>
>>
>>  Can we see the exact configuration?
>>
>>
>>
>>  Example - With the supplied test configs, I can see graphs for services
>> such as users, procs, and swap, but not for ping4 nor ping6, even though I
>> can see the performance data under "Service State Information".
>> There are also no rrd files created for these services
>> under /var/lib/pnp4nagios/perfdata/localhost
>>
>>
>>  Verify that these check commands and plugins provide valid performance
>> data.
>>
>>
>>
>>  Is it a current limitation/bug, or am I doing something wrong?
>>
>>
>>  Hard to tell with that little details you provided.
>>
>>
>>  Please let me know if you require any additional details from my end. I
>> followed this guide in order to get pnp up and running:
>>
>> https://wiki.icinga.org/display/howtos/Setting+up+PNP+with+Icinga2+on+Debian
>>
>>  Thanks in advance.
>>
>>
>>  _______________________________________________
>> icinga-users mailing listicinga-users at lists.icinga.orghttps://lists.icinga.org/mailman/listinfo/icinga-users
>>
>>
>>
>> --
>> Michael Friedrich, DI (FH)
>> Application Developer
>>
>> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
>> Tel: +49 911 92885-0 | Fax: +49 911 92885-77
>> GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
>> http://www.netways.de | Michael.Friedrich at netways.de
>>
>> ** Open Source Backup Conference 2014 - September - osbconf.org **
>> ** Puppet Camp Duesseldorf 2014 - Oktober - netways.de/puppetcamp **
>> ** OSMC 2014 - November - netways.de/osmc **
>> ** OpenNebula Conf 2014 - Dezember - opennebulaconf.com **
>>
>> _______________________________________________
>> icinga-users mailing list
>> icinga-users at lists.icinga.org
>> https://lists.icinga.org/mailman/listinfo/icinga-users
>>
>>
>
>
> _______________________________________________
> icinga-users mailing listicinga-users at lists.icinga.orghttps://lists.icinga.org/mailman/listinfo/icinga-users
>
>
>
> --
> Michael Friedrich, DI (FH)
> Application Developer
>
> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
> Tel: +49 911 92885-0 | Fax: +49 911 92885-77
> GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
> http://www.netways.de | Michael.Friedrich at netways.de
>
> ** Open Source Backup Conference 2014 - September - osbconf.org **
> ** Puppet Camp Duesseldorf 2014 - Oktober - netways.de/puppetcamp **
> ** OSMC 2014 - November - netways.de/osmc **
> ** OpenNebula Conf 2014 - Dezember - opennebulaconf.com **
>
> _______________________________________________
> icinga-users mailing list
> icinga-users at lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20140806/ae0cdd0d/attachment-0001.html>


More information about the icinga-users mailing list