R: R: check_udp error message

Marco Borsani m.borsani at it.net
Fri Sep 6 08:19:37 CEST 2013


I have not any idea how to construct a packet to send/receive...I did not
thing was necessary to use that plugin......

>From yesterday evening there are a couple of udp/port  that goes up/down in
5/10 minutes...Using old version , check_udp (nagios-plugins 1.3.1) 1.4.2.1
, without any strings.
How can be possible? The port is always open.

Using nmap command I see all the UDP/ports open..
Must I use that command to monitor my UDP/ports ???


Marco



-----Messaggio originale-----
Da: frank [mailto:ratty at they.org] 
Inviato: giovedì 5 settembre 2013 20:24
A: Nagios Users List
Cc: Marco Borsani
Oggetto: Re: [Nagios-users] R: check_udp error message

You need to send a message that the listening daemon will understand. The
check_snmp plugin speaks the SNMP language so it knows how to construct a
packet that snmpd will understand. I imagine an OID is a requirement for
check_snmp, as well as community string or security credentials, those are
all part of the "send". If you want to use check_udp for this, then you have
to construct that packet yourself.

On the flip-side, you should know the expected response to a known query. 
If you make an SNMP request for .1.3.6.1.2.1.1.4.0 you should expect a
string from the "syscontact" line from your snmpd.conf in response.

Just like you would use check_http rather than check_tcp for an Apache
service, it's probably best to use a custom program like check_dns rather
than check_udp to check a DNS service. In the case of SNMP, I prefer to use
or write scripts that are specific to what I'm polling rather than using a
generic request/response program. For instance, a program like
check_snmp_load.pl could be alot more robust than running "check_snmp -o
.1.3.6.1.4.1.2021.10.1.3.1" alone.

-f

On Thu, 5 Sep 2013, Marco Borsani wrote:

> Date: Thu, 5 Sep 2013 09:06:38 +0200
> From: Marco Borsani <m.borsani at it.net>
> Reply-To: Nagios Users List <nagios-users at lists.sourceforge.net>
> To: 'Andreas Ericsson' <ae at op5.se>,
>     'Nagios Users List' <nagios-users at lists.sourceforge.net>
> Subject: [Nagios-users] R: check_udp error message
> 
> Ok, but what can I "send" and "receive" to/from the host?
>
> I also tried old version of check_udp (that does not need any string), 
> but I read :
> No data was recieved from host!
> No response from host on port XX
>
> Or simply:
> No response from host on port XX
>
> I see another strange situation.
> On port 161 I can use check_snmp (work correctly), but if I use 
> check_udp on port 161 it does not work at all !
> How can be possible ?
>
> Regards
>
> -----Messaggio originale-----
> Da: Andreas Ericsson [mailto:ae at op5.se]
> Inviato: marted? 3 settembre 2013 15:54
> A: Nagios Users List
> Cc: Marco Borsani
> Oggetto: Re: [Nagios-users] check_udp error message
>
> On 2013-09-03 12:33, Marco Borsani wrote:
>> Hi all
>>
>> I need to control many UDP ports.
>>
>>
>>
>> I run the command:
>>
>> ./check_udp ?H <IP_ADDRESS> ?p 88
>>
>>
>>
>> I receive following error message (with state UNKNOWN) :
>>
>> With UDP checks, a send/expect string must be specified
>>
>>
>>
>> Can anyone help me to solve it?
>>
>> Those parameters should be optional..
>>
>
> UDP is a connection-less protocol. The "expect" string could indeed be 
> optional, and we could just expect to get something at all back when 
> we send something, but without sending anything we won't even touch 
> the network, so the remote host has no idea that we're trying to talk 
> to it and we won't know if the port is up.
>
> That's why "send", at least, is not optional.
>
>


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
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