[Nagiosplug-devel] Nagiosplug-devel Digest, Vol 34, Issue 6

hamouda dimmumeister at gmail.com
Thu Mar 12 13:53:31 CET 2009


I mean by adding an entry in the web interface, to add a section like
the monitoring or home in the web interface so I can access my plugins
through this web interface. sorry for the inconvenience and thx for
answering.

2009/3/12, nagiosplug-devel-request at lists.sourceforge.net
<nagiosplug-devel-request at lists.sourceforge.net>:
> Send Nagiosplug-devel mailing list submissions to
> 	nagiosplug-devel at lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> or, via email, send a message with subject or body 'help' to
> 	nagiosplug-devel-request at lists.sourceforge.net
>
> You can reach the person managing the list at
> 	nagiosplug-devel-owner at lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Nagiosplug-devel digest..."
>
>
> Today's Topics:
>
>    1. adding element in the nagios web interface (hamouda)
>    2. Re: adding element in the nagios web interface (Jason Martin)
>    3. one graph file for several checks (Tiberiu Padurean)
>    4. Re: one graph file for several checks (Holger Weiss)
>    5. [ nagiosplug-Bugs-1985230 ] check_snmp does not	allow " chars
>       in cmdline (SourceForge.net)
>    6. [ nagiosplug-Bugs-1985230 ] check_snmp does not	allow " chars
>       in cmdline (SourceForge.net)
>    7. [ nagiosplug-Bugs-1985230 ] check_snmp does not	allow " chars
>       in cmdline (SourceForge.net)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 9 Mar 2009 13:46:44 +0100
> From: hamouda <dimmumeister at gmail.com>
> Subject: [Nagiosplug-devel] adding element in the nagios web interface
> To: "nagiosplug-devel at lists.sourceforge.net"
> 	<nagiosplug-devel at lists.sourceforge.net>
> Message-ID:
> 	<8b1d85200903090546q24d5b34sa4fd0862afb3f726 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
> I was trying to add an entry in the nagios web interface and I didn't know
> how.
> Can u please tell me how to do it??
>
> --
> being selfish won't help you progressing, learn & share that's the
> point. Give a hand in the forums to help the others & urself;
> http://www.fedora-tunisia.org/
> http://forums.fedora-fr.org/
> http://fedora.kiewel-online.de/repoview/linux/releases/7/
>
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 9 Mar 2009 06:48:12 -0700
> From: Jason Martin <jhmartin at toger.us>
> Subject: Re: [Nagiosplug-devel] adding element in the nagios web
> 	interface
> To: Nagios Plugin Development Mailing List
> 	<nagiosplug-devel at lists.sourceforge.net>
> Message-ID: <20090309134812.GB20391 at mal.toger.us>
> Content-Type: text/plain; charset="us-ascii"
>
> On Mon, Mar 09, 2009 at 01:46:44PM +0100, hamouda wrote:
>> Hi,
>> I was trying to add an entry in the nagios web interface and I didn't know
>> how.
>> Can u please tell me how to do it??
> What do you mean my 'adding an entry?
>
> -Jason Martin
>
> --
> This message is PGP/MIME signed.
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 219 bytes
> Desc: not available
>
> ------------------------------
>
> Message: 3
> Date: Mon, 9 Mar 2009 15:47:43 +0100
> From: Tiberiu Padurean <Tiberiu.Padurean at tdn.de>
> Subject: [Nagiosplug-devel] one graph file for several checks
> To: "nagiosplug-devel at lists.sourceforge.net"
> 	<nagiosplug-devel at lists.sourceforge.net>
> Message-ID:
> 	<A1CE1D771C19E54BA9091CDA93BF30B1044A31C2D2 at TDN3V24EXS0W.tdn.de>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello,
>
> I have several checks that verify different databases.
> All the services that define this kind of checks have this
> service_description: oracle_tablespace_usage for database_name
> The database_name is all that differs in all the checks. For these checks I
> want to add the graphs, too.
> I define a graph file (check_database.ncfg) like this:
>
> define ngraph{
>                                  service_name       oracle_tablespace_usage
> for database_name
>                                 ......
>                                 }
>
> Can I use regular expressions when I define the service_name in the
> definition of the graphs?
> Because I want to use only one check_database.ncfg file and generate graphs
> for all the checks that verify those databases.
>
> Thank you
>
>
> Viele Gr??e,
>
> ServiceDesk_TDN
> Tiberiu Padurean
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 4
> Date: Tue, 10 Mar 2009 13:30:24 +0100
> From: Holger Weiss <holger at CIS.FU-Berlin.DE>
> Subject: Re: [Nagiosplug-devel] one graph file for several checks
> To: Nagios Plugins Development
> 	<nagiosplug-devel at lists.sourceforge.net>
> Message-ID: <20090310123024.GT25694516 at CIS.FU-Berlin.DE>
> Content-Type: text/plain; charset=us-ascii
>
> This list is meant for Nagios plugin development issues.  As you seem to
> be talking about NagiosGrapher, please use the "nagiosgrapher-users"
> list next time:
>
> https://lists.sourceforge.net/lists/listinfo/nagiosgrapher-users
>
> * Tiberiu Padurean <Tiberiu.Padurean at tdn.de> [2009-03-09 15:47]:
>> Can I use regular expressions when I define the service_name in the
>> definition of the graphs?
>
> Yes, that's a regular expression.  See doc/CONFIG:
>
> | - service_name
> | With the help of this regexp/part NagiosGRapher will identify the
> individual
> | services. eg. "lx-procs" will match on "lx-procs", "lx-procs samba",
> | "all lx-procs", ...
>
> Holger
>
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 11 Mar 2009 20:34:27 +0000
> From: "SourceForge.net" <noreply at sourceforge.net>
> Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1985230 ] check_snmp
> 	does not	allow " chars in cmdline
> To: noreply at sourceforge.net
> Message-ID: <E1LhV8F-0003Ny-2D at h45xhf1.ch3.sourceforge.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Bugs item #1985230, was opened at 2008-06-05 01:46
> Message generated for change (Comment added) made by jbarbuto
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985230&group_id=29880
>
> Please note that this message will contain a full copy of the comment
> thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: Argument proccessing
> Group: CVS
> Status: Open
> Resolution: None
> Priority: 7
> Private: No
> Submitted By: Jan Wagner (cyco_dd)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: check_snmp does not allow " chars in cmdline
>
> Initial Comment:
> The following Bugreport we got against our debian package:
>
> snmpd can be queried for customized "extend"s.
> A configured extend like
>     extend avail_mem /usr/local/bin/check_avail_mem.pl
> can be queried as
>     snmpget -c public -v1 ds9 'nsExtendOutput1Line."avail_mem"'
>     NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."avail_mem" = STRING: 749764
>
> If you try to query this with check_snmp like
>     check_snmp -H $HOSTADDRESS$ -C public -o
> 'nsExtendOutput1Line."syslog-idletime"'
> this results into
>     Could not open pipe: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c public
> ds9:161 nsExtendOutput1Line."syslog-idletime"
>
> Unfortuantely, check_snmp contains code in popen.c that does not allow any "
> chars in
> the command line and bails out with above error.
>
> I fixed this by commenting out the follwing block:
>
> --- popen.c.old 2008-01-12 14:16:39.000000000 +0100
> +++ popen.c     2008-01-12 14:16:54.000000000 +0100
> @@ -133,8 +133,10 @@
>         strcpy (cmd, cmdstring);
>
>         /* This is not a shell, so we don't handle "???" */
> +/*
>         if (strstr (cmdstring, "\""))
>                 return NULL;
> +*/
>
>         /* allow single quotes, but only if non-whitesapce doesn't occur on
> both sides */
>         if (strstr (cmdstring, " ' ") || strstr (cmdstring, "'''"))
>
> You can track the bugreport via
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=460405
>
> Thanks and kind regards, Jan.
>
> ----------------------------------------------------------------------
>
> Comment By: John A. Barbuto (jbarbuto)
> Date: 2009-03-11 13:34
>
> Message:
> I looked into writing a patch using the runcmd library, but I don't see
> this function you're referring to.
> np_runcmd_open() looks pretty similar to spopen(), with the same double
> quotes restriction.
>
> The old exec method of running external commands is deprecated, so I'd
> really like to get extend working.
>
> ----------------------------------------------------------------------
>
> Comment By: Ton Voon (tonvoon)
> Date: 2009-02-19 16:11
>
> Message:
> I don't think this is a valid fix. Preferably check_snmp should be switched
> to use the runcmd library instead, which has a function to pass a varg list
> for the command to run, thereby avoiding shell quotation.
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985230&group_id=29880
>
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 11 Mar 2009 21:24:04 +0000
> From: "SourceForge.net" <noreply at sourceforge.net>
> Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1985230 ] check_snmp
> 	does not	allow " chars in cmdline
> To: noreply at sourceforge.net
> Message-ID: <E1LhVuG-0005AV-93 at 565xhf1.ch3.sourceforge.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Bugs item #1985230, was opened at 2008-06-05 03:46
> Message generated for change (Comment added) made by mechanyx
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985230&group_id=29880
>
> Please note that this message will contain a full copy of the comment
> thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: Argument proccessing
> Group: CVS
> Status: Open
> Resolution: None
> Priority: 7
> Private: No
> Submitted By: Jan Wagner (cyco_dd)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: check_snmp does not allow " chars in cmdline
>
> Initial Comment:
> The following Bugreport we got against our debian package:
>
> snmpd can be queried for customized "extend"s.
> A configured extend like
>     extend avail_mem /usr/local/bin/check_avail_mem.pl
> can be queried as
>     snmpget -c public -v1 ds9 'nsExtendOutput1Line."avail_mem"'
>     NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."avail_mem" = STRING: 749764
>
> If you try to query this with check_snmp like
>     check_snmp -H $HOSTADDRESS$ -C public -o
> 'nsExtendOutput1Line."syslog-idletime"'
> this results into
>     Could not open pipe: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c public
> ds9:161 nsExtendOutput1Line."syslog-idletime"
>
> Unfortuantely, check_snmp contains code in popen.c that does not allow any "
> chars in
> the command line and bails out with above error.
>
> I fixed this by commenting out the follwing block:
>
> --- popen.c.old 2008-01-12 14:16:39.000000000 +0100
> +++ popen.c     2008-01-12 14:16:54.000000000 +0100
> @@ -133,8 +133,10 @@
>         strcpy (cmd, cmdstring);
>
>         /* This is not a shell, so we don't handle "???" */
> +/*
>         if (strstr (cmdstring, "\""))
>                 return NULL;
> +*/
>
>         /* allow single quotes, but only if non-whitesapce doesn't occur on
> both sides */
>         if (strstr (cmdstring, " ' ") || strstr (cmdstring, "'''"))
>
> You can track the bugreport via
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=460405
>
> Thanks and kind regards, Jan.
>
> ----------------------------------------------------------------------
>
> Comment By: Richard Edward Horner (mechanyx)
> Date: 2009-03-11 16:24
>
> Message:
> I'm not sure if this is related or not, but I had a similar problem with
> check_snmp where the community string on a network device contained a
> dollar sign ($). I was unable to get the check to run with that community
> string. I apologize as I do not remember exactly what Nagios output when I
> tried various methods of quoting or escaping it. I ended up changing the
> community string on the device.
>
> Thanks, Rich(ard)
>
> ----------------------------------------------------------------------
>
> Comment By: John A. Barbuto (jbarbuto)
> Date: 2009-03-11 15:34
>
> Message:
> I looked into writing a patch using the runcmd library, but I don't see
> this function you're referring to.
> np_runcmd_open() looks pretty similar to spopen(), with the same double
> quotes restriction.
>
> The old exec method of running external commands is deprecated, so I'd
> really like to get extend working.
>
> ----------------------------------------------------------------------
>
> Comment By: Ton Voon (tonvoon)
> Date: 2009-02-19 19:11
>
> Message:
> I don't think this is a valid fix. Preferably check_snmp should be switched
> to use the runcmd library instead, which has a function to pass a varg list
> for the command to run, thereby avoiding shell quotation.
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985230&group_id=29880
>
>
>
> ------------------------------
>
> Message: 7
> Date: Thu, 12 Mar 2009 11:18:24 +0000
> From: "SourceForge.net" <noreply at sourceforge.net>
> Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1985230 ] check_snmp
> 	does not	allow " chars in cmdline
> To: noreply at sourceforge.net
> Message-ID: <E1Lhivg-00040u-2X at 565xhf1.ch3.sourceforge.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Bugs item #1985230, was opened at 2008-06-05 09:46
> Message generated for change (Comment added) made by tonvoon
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985230&group_id=29880
>
> Please note that this message will contain a full copy of the comment
> thread,
> including the initial issue submission, for this request,
> not just the latest update.
> Category: Argument proccessing
> Group: CVS
> Status: Open
> Resolution: None
> Priority: 7
> Private: No
> Submitted By: Jan Wagner (cyco_dd)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: check_snmp does not allow " chars in cmdline
>
> Initial Comment:
> The following Bugreport we got against our debian package:
>
> snmpd can be queried for customized "extend"s.
> A configured extend like
>     extend avail_mem /usr/local/bin/check_avail_mem.pl
> can be queried as
>     snmpget -c public -v1 ds9 'nsExtendOutput1Line."avail_mem"'
>     NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."avail_mem" = STRING: 749764
>
> If you try to query this with check_snmp like
>     check_snmp -H $HOSTADDRESS$ -C public -o
> 'nsExtendOutput1Line."syslog-idletime"'
> this results into
>     Could not open pipe: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c public
> ds9:161 nsExtendOutput1Line."syslog-idletime"
>
> Unfortuantely, check_snmp contains code in popen.c that does not allow any "
> chars in
> the command line and bails out with above error.
>
> I fixed this by commenting out the follwing block:
>
> --- popen.c.old 2008-01-12 14:16:39.000000000 +0100
> +++ popen.c     2008-01-12 14:16:54.000000000 +0100
> @@ -133,8 +133,10 @@
>         strcpy (cmd, cmdstring);
>
>         /* This is not a shell, so we don't handle "???" */
> +/*
>         if (strstr (cmdstring, "\""))
>                 return NULL;
> +*/
>
>         /* allow single quotes, but only if non-whitesapce doesn't occur on
> both sides */
>         if (strstr (cmdstring, " ' ") || strstr (cmdstring, "'''"))
>
> You can track the bugreport via
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=460405
>
> Thanks and kind regards, Jan.
>
> ----------------------------------------------------------------------
>
>>Comment By: Ton Voon (tonvoon)
> Date: 2009-03-12 11:18
>
> Message:
> jbarbuto: Can you see the cmd_run and cmd_run_array in lib/utils_cmd.c?
> This is also used in negate.c. The idea is that if you pass an array of
> arguments, there will not be any shell expansion.
>
> mechanyx: There may be quoting that is required at Nagios. If you use $ in
> a command argument, you need to escape it with $$.
>
> ----------------------------------------------------------------------
>
> Comment By: Richard Edward Horner (mechanyx)
> Date: 2009-03-11 21:24
>
> Message:
> I'm not sure if this is related or not, but I had a similar problem with
> check_snmp where the community string on a network device contained a
> dollar sign ($). I was unable to get the check to run with that community
> string. I apologize as I do not remember exactly what Nagios output when I
> tried various methods of quoting or escaping it. I ended up changing the
> community string on the device.
>
> Thanks, Rich(ard)
>
> ----------------------------------------------------------------------
>
> Comment By: John A. Barbuto (jbarbuto)
> Date: 2009-03-11 20:34
>
> Message:
> I looked into writing a patch using the runcmd library, but I don't see
> this function you're referring to.
> np_runcmd_open() looks pretty similar to spopen(), with the same double
> quotes restriction.
>
> The old exec method of running external commands is deprecated, so I'd
> really like to get extend working.
>
> ----------------------------------------------------------------------
>
> Comment By: Ton Voon (tonvoon)
> Date: 2009-02-20 00:11
>
> Message:
> I don't think this is a valid fix. Preferably check_snmp should be switched
> to use the runcmd library instead, which has a function to pass a varg list
> for the command to run, thereby avoiding shell quotation.
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985230&group_id=29880
>
>
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
>
> ------------------------------
>
> _______________________________________________________
> Nagios Plugin Development Mailing List
> Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
>
>
> End of Nagiosplug-devel Digest, Vol 34, Issue 6
> ***********************************************
>


-- 
being selfish won't help you progressing, learn & share that's the
point. Give a hand in the forums to help the others & urself;
http://www.fedora-tunisia.org/
http://forums.fedora-fr.org/
http://fedora.kiewel-online.de/repoview/linux/releases/7/




More information about the Devel mailing list