[Nagiosplug-devel] NRPE Protocol
Hiren Patel
hir3npatel at gmail.com
Wed Sep 2 21:32:48 CEST 2009
Michael Wyraz wrote:
> Hi,
>
> because I wanted to integrate some of our own monitoring tasks to
> nagios, I spent some time with the NRPE protocol. Since it's almost
> impossible to find some documentation, I gathered my informations from
> the source.
>
> Here's what I found out about it:
> - any numbers are stored in big-endian notation (highest bytes first)
> - a packet consists of exactly 1036 Bytes
> - 2 byte integer: version of the protocol (currently 1,2,3)
> - 2 byte integer: type of the packet (1=request, 2=response)
> - 4 byte long integer: crc32 checksum of the message
> - 2 byte integer: return code of the remote command (in requests it's
> filled with a random number)
> - 1024 byte data: the command or response text, filled with zero-bytes
> - 2 byte of garbage: this is because the c structure is sent "as it
> is" over the wire. When creating messages, it's fine to set it to zero.
> - the crc32 checksum is calculated from the whole message (including the
> 2 bytes of garbage). the 4 bytes reserved for the crc are set to zero
> for calculation the crc. The default crc32 algorithm is used.
>
out of interest, where do you determine that there is 2 bytes of
garbage? I've had a peak at nrpe, I don't clearly see why this is the case.
regarding your suggestion on http://hessian.caucho.com/, is this not
more of a web orientated protocol. what made you pick this, curious.
I like your ideas around a variable length plugin output, moving the
checksum to the end and HMAC.
More information about the Devel
mailing list