R: R: R: check_memory does not work prou7ijijnu:perly

David Fulton booleanenator at gmail.com
Mon Aug 13 18:50:03 CEST 2012


Three things, is check_memory a perl script and if so, have you
enabled the embedded perl interpreter, if so, you may need to disable
it for the check_memory plugin, there is some verbiage at the top of
the script that you must put in. I forget what it is and it also
depends on whether the default is to use the ePN or not. The other one
is you might need to put double quotes around the $ARG1$ and $ARG2$
and see if that helps. I have found that with certain characters the
shell gets in the way. Lastly, check and make sure that you are not
blocking the % symbol in your natios.conf. There is a list of
characters which are not allowed in shell commands. Seem to remember
that one being in there by default which caused issues with so many
plugins since a lot of them take percentages.

On Thu, Aug 2, 2012 at 9:23 PM, Jarlath Lyons
<Jarlath.Lyons at tideworks.com> wrote:
> I
>
> Marco Borsani <m.borsani at it.net> wrote:
>
>
> Yes I did.
>
> Da: James Pratt [mailto:jpratt at norwich.edu]
> Inviato: giovedì 2 agosto 2012 16:01
> A: 'Nagios Users List'
> Oggetto: Re: [Nagios-users] R: R: check_memory does not work properly
>
> Have you tried su’ing to the nagios user and running it from the command line? I am betting it’s permissions issue.
>
> Cheers,
> James
>
> From: Marco Borsani [mailto:m.borsani at it.net]<mailto:[mailto:m.borsani at it.net]>
> Sent: Thursday, August 02, 2012 9:48 AM
> To: 'Nagios Users List'
> Subject: [Nagios-users] R: R: check_memory does not work properly
>
> No idea?
>
> Regards
>
> Da: Marco Borsani [mailto:m.borsani at it.net]<mailto:[mailto:m.borsani at it.net]>
> Inviato: mercoledì 1 agosto 2012 09:19
> A: 'Nagios Users List'
> Oggetto: [Nagios-users] R: check_memory does not work properly
>
> Commands.cfg
>
> # 'check_local_memory' command definition
> define command{
>         command_name    check_local_memory
>         command_line    $USER1$/check_memory -w $ARG1$ -c $ARG2$
>         }
>
> Services.cfg
>
> define service{
>         use                                               active-service
>         host_name                               <ip- addresses>
>         service_description               check_local_memory
>         check_command                   check_local_memory!10%!5%
>         max_check_attempts           3
>         normal_check_interval         5
>         retry_check_interval             1
>         check_period                           24x7
>         notification_interval              120
>         notification_period                24x7
>         notification_options              w,u,c,r
>         notifications_enabled          1
>         contact_groups                       CG_admin
>         }
>
>
> >From line command:
> $> ./check_memory -w 10% -c 5%
> OK - free memory is 27% which is within expected threshold| mem=27;10;5;0;100
>
> Regards
>
>
> Da: Morris, Patrick [mailto:patrick.morris at hp.com]<mailto:[mailto:patrick.morris at hp.com]>
> Inviato: martedì 31 luglio 2012 23:24
> A: nagios-users at lists.sourceforge.net<mailto:nagios-users at lists.sourceforge.net>
> Oggetto: Re: [Nagios-users] check_memory does not work properly
>
> Posting your check configuration is really helpful in cases like this.  It’s almost impossible to give a good answer without knowing how you’ve set the check up.
>
> From: Marco Borsani [mailto:m.borsani at it.net]<mailto:[mailto:m.borsani at it.net]>
> Sent: Tuesday, July 31, 2012 6:52 AM
> To: NAGIOS
> Subject: [Nagios-users] check_memory does not work properly
>
> Hi all
>
>
> I am using a simple plug-in to check the nagios server memory.
>
> When I run it like user Nagios, it works perfectly. I see this output:
> OK - free memory is 40% which is within expected threshold| mem=40;10;5;0;100
>
> When I run it with Nagios program I receive this notification:
>
> …..
>
> Command:         check_local_memory
>
> State:                   WARNING
>
> Message:            (null)
> ….
>
>
> Any idea ?
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> 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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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