[Nagiosplug-help] How to interpret CRC32 e rrors?
Ralph.Grothe at itdz-berlin.de
Ralph.Grothe at itdz-berlin.de
Thu Aug 4 18:31:29 CEST 2005
Good news (for me).
I found the remedy against unruly CRC32 NRPE chokes.
When I tested my script at the shell I made sure by redirecting
stderr to /dev/null
that indeed nothing was sent there.
However, when this script got executed (or rather crchecked) by
nrpe
something must have sneaked to stderr.
So I simply put this statement in the beginning of my script:
[saz at inwo2]
$ grep -n exec\ /usr/local/nagios/libexec/check_hpva.sh
6:exec 2>/dev/null
By shutting stderr the a priori crcheck cannot produce
differences.
Now I can execute through nrpe
[saz at inwo2]
$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c
check_hpva_INWO2
OK: HP Virtual Array "va" on inwo2 all FRUs State Good
And even from the nagios server remotely this works now
[nagios at daisy:~]
$ libexec/check_nrpe -H inwo2 -c check_hpva_INWO2
OK: HP Virtual Array "va" on inwo2 all FRUs State Good
Lesson learnt, for all own plug-ins you write explicitly close
stderr
to avoid any CRC32 annoyances.
So this conclusion would take only one line to be added to the
documentation!
I again rechecked the "Nagios plug-in development guidelines" but
didn't find such a reference.
It would have saved me two hours and you my reduntant noise.
Happy NRPEing
Ralph
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of
> Ralph.Grothe at itdz-berlin.de
> Sent: Thursday, August 04, 2005 5:37 PM
> To: ae at op5.se
> Cc: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] RE: [Nagiosplug-help] How to interpret
CRC32
> errors?
>
>
> > You're asking people to help you on their spare time. Most of
> your
> > questions so far have been either no-brainers that you would
> > have been
> > able to figure out for yourself had you made the effort, or
> > of the kind
> > that would take considerable effort to answer properly.
>
> I know that I waste the time of people who are willing to help
> me.
>
> Did I know more about Nagios I would happily pay back by
> answering others' questions.
>
> I had the impression that the developpers had left the
> documentation sketchy in favour of directing people to the
> nagios-users mailing list (at least that's what every plug-in's
> help screen suggests)
> I know what an unpleasant duty it is for developers to
document.
>
> To someone so much and probably long time involved in the
Nagios
> project as you
> (only assuming this as I don't know your background or role
here)
> my questions may seem like brain farts.
>
> I only wonder why, if you are so pissed off by them, simply
don't
> ignore them.
>
> >
> > On a sidenote, it's considered very rude to cross-post unless
> you're
> > making an announcement of some sort, so please refrain from
> > doing so in
> > the future.
>
> I didn't know I was cross posting.
> I didn't regard sending my questions to nagios-users and
> nagiosplug-help simultaniously
> as real cross postings.
> I didn't post in other 10 lists or so, and I didn't spam or
post
> off-topic announcements, nor insult someone here.
>
> If the mailing list moderators opened this list to the public
of
> all kinds of Nagios users
> list subscribers have to live with dumb questions of Nagios
> newbies like me.
>
> Having learned that I breached the list netiquette I will only
> post to one list in the future.
>
> > Did you log in as the NRPE user or did you just su? su'ing
> > maintains the
> > environment settings of the old user, which will have effect
on
> some
> > programs.
>
> No simple su-ing.
> Even if I had, I would have taken care to do a full "su -" to
> also obtain the account's environment.
> I am and was logged in under the account that I configured
inetd
> to run the nrpe server as
> (see 5th field, or 4th field for you)
>
> [saz at inwo2]
> $ id
> uid=102(saz) gid=20(users) groups=102(saz)
>
> [saz at inwo2]
> $ grep nrpe /etc/inetd.conf
> nrpe stream tcp nowait saz /usr/local/nagios/sbin/nrpe nrpe
-c
> /usr/local/nagios/etc/nrpe.cfg -i
>
>
> > check_hpva.sh prints something to stderr. This causes the
> > NRPE daemon to
> > miscalculate the checksum. When the plugin does the same it
> > arrives at
> > an invalid result.
>
>
> My script isn't writing anything to stderr, and it's outputting
a
> single line to stdout
> (which is I think is in accordance to plug-in developer's
> guidelines)
>
>
> [saz at inwo2]
> $ /usr/local/nagios/libexec/check_hpva.sh 2>/dev/null | cat -n
> 1 OK: HP Virtual Array "va" on inwo2 all FRUs State
> Good
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference &
EXPO
> September 19-22, 2005 * San Francisco, CA * Development
> Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams *
> Testing & QA
> Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
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
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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