(no subject)

Palle Jensen palleje at gmail.com
Sun Jun 10 16:55:40 CEST 2007


That is what I suspect as well, because in the ngraph.log I see that for the
service a no block was found. I am not sure though how to add the correct
value in the check_ntmem.ncfg file? Could you please show me how the done
ncfg file would look like?

The value you suggested:
> #   perfdata: 'physical memory'=63%;85;95;
> /perfdata:.*memory'=([.0-9]+)%;([.0-9]+);([.0-9]+)/
> and push @s, [ ntmem,
>       [ memused, GAUGE, $1],
>       [ memwarn, GAUGE, $2],
>       [ memcrit, GAUGE, $3] ];


Right now it (check_ntmem.ncfg) looks like this:
define ngraph {
  graph_legend Memory Used
  graph_perf_regex MemUsed=([0-9]+)%
  graph_value MemUsed
  hide yes
  rrd_color 00a000
  rrd_plottype AREA
  service_name Memuse
}

define ngraph {
  graph_legend Warning
  graph_perf_regex MemUsed=[0-9]+%;([0-9]+);
  graph_value MemWarning
  hide yes
  rrd_color 00a000
  rrd_plottype HRULE
  service_name Memuse
}

define ngraph {
  graph_legend Critical
  graph_perf_regex MemUsed=[0-9]+%;[0-9]+;([0-9]+)
  graph_value MemCritical
  hide yes
  rrd_color 00a000
  rrd_plottype HRULE
  service_name Memuse
}

define ngraph {
  graph_legend Total Space
  graph_perf_regex ([0-9]+)$
  graph_value MemTotal
  hide yes
  rrd_color 00ff00
  rrd_plottype AREA
  service_name Memuse
}

define ngraph {
  graph_calc MemTotal,MemUsed,-
  graph_legend Free Space
  graph_value MemFree
  hide yes
  rrd_color ff0000
  rrd_plottype AREA
  service_name Memuse
  type CDEF
}

define ngraph {
  graph_calc MemUsed,100,*,MemTotal,/
  graph_legend Used Space
  graph_units Percent (%)
  graph_value percentused
  hide yes
  rrd_color 1C2B53
  rrd_plottype LINE
  service_name Memuse
  type CDEF
}

define ngraph {
  graph_calc MemWarning,100,*,MemTotal,/
  graph_legend Warning
  graph_units Percent (%)
  graph_value percentwarning
  hide yes
  rrd_color FF7700
  rrd_plottype LINE
  service_name Memuse
  type CDEF
}

define ngraph {
  graph_calc MemCritical,100,*,MemTotal,/
  graph_legend Critical
  graph_units Percent (%)
  graph_value percentcritical
  hide yes
  rrd_color FF0000
  rrd_plottype LINE
  service_name Memuse
  type CDEF
}

define ngraph {
  graph_calc
percentused,UN,0,percentused,percentwarning,GT,percentwarning,percentused,IF
,IF
  graph_legend Used Memory
  graph_value Regular
  hide no
  rrd_color AABBFF
  rrd_plottype AREA
  service_name Memuse
  type CDEF
}

define ngraph {
  graph_calc
percentused,UN,0,percentused,percentwarning,-,0,LE,0,percentused,percentcrit
ical,GE,100,percentcritical,-,percentused,percentwarning,-,IF,IF,IF
  graph_units Percent (%)
  graph_upper_limit 100
  graph_value Warning
  hide no
  rrd_color FFDD66
  rrd_plottype STACK
  service_name Memuse
  type CDEF
}

define ngraph {
  graph_calc
percentused,UN,0,percentused,percentcritical,-,0,LE,0,percentused,percentcri
tical,-,IF,IF
  graph_units Percent (%)
  graph_upper_limit 100
  graph_value Critical
  hide no
  rrd_color FF0000
  rrd_plottype STACK
  service_name Memuse
  type CDEF
}

define ngraph {
  graph_calc percentused,AVERAGE
  graph_legend Average Usage
  graph_units Percent (%)
  graph_value vdef_swap_average
  hide no
  rrd_color 66CC33
  rrd_plottype LINE1
  service_name Memuse
  type VDEF
}

define ngraph {
  graph_calc percentwarning,AVERAGE
  graph_legend Warning
  graph_units Percent (%)
  graph_value vdef_warning_average
  hide no
  rrd_color FF7700
  rrd_plottype LINE1
  service_name Memuse
  type VDEF
}

define ngraph {
  graph_calc percentcritical,AVERAGE
  graph_legend Critical
  graph_legend_eol LEFT
  graph_units Percent (%)
  graph_value vdef_critical_average
  hide no
  rrd_color FF0000
  rrd_plottype LINE1
  service_name Memuse
  type VDEF
}

define ngraph {
  print_eol justify
  service_name Memuse
  type COMMENT
}

define ngraph {
  print_description Latest Usage:
  print_format %11.2lf MB
  print_function LAST
  print_source MemUsed
  service_name Memuse
  type GPRINT
}

define ngraph {
  print_format (%3.2lf %%)
  print_function LAST
  print_source percentused
  service_name Memuse
  type GPRINT
}

#define ngraph {
#  print_description This is a comment
#  service_name Memuse
#  type COMMENT
#}

#define ngraph {
#  print_description This is another comment #  service_name Memory #  type
COMMENT #}

define ngraph {
  print_description Free Space:
  print_eol justify
  print_format %11.2lf MB
  print_function LAST
  print_source MemFree
  service_name Memuse
  type GPRINT
}

define ngraph {
print_description Average Usage:
print_format %11.2lf MB
print_function AVERAGE
print_source MemUsed
service_name Memuse
type GPRINT
}

define ngraph {
  print_format (%3.2lf %%)
  print_function AVERAGE
  print_source percentused
  service_name Memuse
  type GPRINT
}

#define ngraph {
#  print_description More comment
#  service_name Memuse
#  type COMMENT
#}

#define ngraph {
#  print_description And comment
#  service_name Memuse
#  type COMMENT
#}

define ngraph {
  print_description Used Space:
  print_eol justify
  print_format %11.2lf MB
  print_function LAST
  print_source MemUsed
  service_name Memuse
  type GPRINT
}

define ngraph {
  print_description Maximum Usage:
  print_format %11.2lf MB
  print_function MAX
  print_source MemUsed
  service_name Memuse
  type GPRINT
}

define ngraph {
  print_format (%3.2lf %%)
  print_function MAX
  print_source percentused
  service_name Memuse
  type GPRINT
}

#define ngraph {
#  print_description Tired of comments?
#  service_name Memuse
#  type COMMENT
#}

#define ngraph {
#  print_description A comment
#  service_name Memuse
#  type COMMENT
#}

define ngraph {
  print_description Total Space:
  print_eol justify
  print_format %11.2lf MB
  print_function LAST
  print_source MemTotal
  service_name Memuse
  type GPRINT
}
#EOF--

This is how the service defenition looks:
define service{
use				generic-service
host_name			winserver
service_description	Memuse
check_command		check_ntmem!MEMUSE!-w 80 -c 90
	}
And this is how the commands.cfg looks:

define command{
command_name	check_ntmem
command_line	$USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v $ARG1$ $ARG2$
	}

Thanks,
- Palle


-----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Phil
Costelloe
Sent: Thursday, June 07, 2007 5:16 AM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] (no subject)

glynn.seymour at bayerbbs.com wrote:
>> Hi to all,
> 
>> I have been trying to find out how you get the graphs for monitored
>> service on Windows/Nsclient++. It is working fine for the locahost
>> (FC9) Memory, load, procs and users. 
> I added a windows machine with NSClient++, I added the service Ping
> to both localhost and the windows machine, and the graphs are
> >showing up fine. But when I add Memory, procs, load service to the
> windows machine no graphs shows. How come it works with ping for both
> localhost and Windows machine? Even though I made sure that >the
> service_description is the same as for the localhost     
>> I am about to go insain, please help? I know this belongs under
> NagiosGrapher mailinglist, and I posted there as well, but I got 0
> answers there, hoping that someone can help me here. 
> 
> Could be a number of things, but my top guesses would be:
> 
> 1.      Performance data collection not ticked in the service
> definition 
> for the extra NSClient++ services
> 2.      No regular expression in the map file to collect the data

[snip]

> I'm betting its '2' though, here's an example from NSClient++ for
> Memory check graphing 
> 
> # Service type: ntmem
> #   check command:
> #   output:
> #   perfdata: 'physical memory'=63%;85;95;
> /perfdata:.*memory'=([.0-9]+)%;([.0-9]+);([.0-9]+)/
> and push @s, [ ntmem,
>       [ memused, GAUGE, $1],
>       [ memwarn, GAUGE, $2],
>       [ memcrit, GAUGE, $3] ];

I agree with your analysis, it probably is just a matter of configuring
the graph tool to recognise the output. But the OP mentioned
NagiosGrapher and that's an example from a Nagiosgraph map file. Those
two letters in the name make all the difference. :)

-- 
Phil Costelloe
Foundation IT, Hermitage Berkshire RG18 9SE 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list