Nagios 2.0rc2 on FC4 x86_64
Miner, Jonathan W (CSC) (US SSA)
jonathan.w.miner at baesystems.com
Thu Jan 19 21:58:41 CET 2006
It turns out that struct timeval is different 8-bytes verses 16-bytes. What if the value of MAX_PLUGINOUTPUT_LENGTH was calculated at compile time, based on the overall size of the service_message structure? Of course, I think this would mean that all of your Nagios machines have to be of the same architecture?
I've recompiled with the two changes shown below... So far so good.
*** objects.h.orig 2006-01-19 15:46:13.000000000 -0500
--- objects.h 2006-01-19 15:46:25.000000000 -0500
***************
*** 45,51 ****
#define MAX_HOSTNAME_LENGTH 64 /* max. host name length */
#define MAX_SERVICEDESC_LENGTH 64 /* max. service description length */
- #define MAX_PLUGINOUTPUT_LENGTH 348 /* max. length of plugin output */
#define MAX_STATE_HISTORY_ENTRIES 21 /* max number of old states to keep track of for flap detection */
--- 45,50 ----
*** nagios.h.orig 2006-01-19 15:47:50.000000000 -0500
--- nagios.h 2006-01-19 15:47:26.000000000 -0500
***************
*** 389,394 ****
--- 389,396 ----
}notification;
+ #define MAX_PLUGINOUTPUT_LENGTH 512-MAX_HOSTNAME_LENGTH-MAX_SERVICEDESC_LENGTH-5*sizeof(int)-2*sizeof(struct timeval) /* max. length of plugin output */
+
/* SERVICE_MESSAGE structure */
typedef struct service_message_struct{
char host_name[MAX_HOSTNAME_LENGTH]; /* host name */
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net on behalf of Chris Waters
Sent: Thu 01/19/2006 03:19 PM
To: nagios-users at lists.sourceforge.net
Cc:
Subject: RE: [Nagios-users] Nagios 2.0rc2 on FC4 x86_64
I have the same issue on Nagios 2.06b FC4 x86_64 although I have not
seen an actualy problem arise from the warning yet that I can tell.
Chris Waters
WAN/LAN Technician
JELD-WEN, Inc.
Network Services Group
===================
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Miner,
Jonathan W (CSC) (US SSA)
Sent: Thursday, January 19, 2006 12:00 PM
To: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Nagios 2.0rc2 on FC4 x86_64
I didn't modify "objects.h", so it must be the compiler padding things
differently for 64-bit.
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net on behalf of Marc
Powell
Sent: Thu 01/19/2006 02:32 PM
To: nagios-users at lists.sourceforge.net
Cc:
Subject: RE: [Nagios-users] Nagios 2.0rc2 on FC4 x86_64
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Miner, Jonathan W (CSC) (US
SSA)
> Sent: Thursday, January 19, 2006 11:29 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Nagios 2.0rc2 on FC4 x86_64
>
> Hi -
>
> I've noticed an interesting warning when running Nagios on a 64-bit
> machine:
>
> > Warning: Size of service_message struct (528 bytes) is > POSIX-
> guaranteed
> > atomic write size (512 bytes). Service checks results may get lost
or
> > mangled!
>
The most probable reason for this is that you have modified the
MAX_HOSTNAME_LENGTH (64), MAX_SERVICEDESC_LENGTH (64) or
MAX_OLUGINOUTPUT_LENGTH (348) variables from their defaults in
include/objects.h. They are set so that the entire service_message
struct is < 512 bytes. If that's not the case then you may be seeing
compiler oddities that cause other structs or types (int, timeval) to be
larger than normal.
> How concerned should I be? Should I be looking for a 32-bit machine
to
> host my production instance of Nagios?
While I can't tell you all the possible problems that might result, one
that I know is that if you are using passive checks, the results may get
lost or mangled because they're larger than what can usually be written
to a named pipe in one go. 32-bit vs 64-bit isn't a factor unless 64-bit
allows for larger pipes. The hostname length + service description
length + plugin output length would have to be > ~480 bytes to be
worrisome.
--
Marc
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems? Stop! Download the new AJAX search engine that
makes searching your log files as easy as surfing the web. DOWNLOAD
SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
_______________________________________________
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
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files for problems? Stop! Download the new AJAX search engine that
makes searching your log files as easy as surfing the web. DOWNLOAD
SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
_______________________________________________
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
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
_______________________________________________
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
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
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