[Nagios-devel] Changing MAX_PLUGINOUTPUT_LENGTH in include/objects.h
Posted: Mon May 03, 2004 4:53 am
Hi,
When changing the value of MAX_PLUGINOUTPUT_LENGTH in include/objects.h,
the pre flight check prints out a warning message about the
size of the service_message struct being longer than the
POSIX-guaranteed
atomic write size. This is the actual code in base/config.c:
/*****************************************/
/* check sanity of service message size... */
/*****************************************/
if(sizeof(service_message)>512){
snprintf(temp_buffer,sizeof(temp_buffer),
"Warning: Size of service_message struct (%d bytes) is >
POSIX-guaranteed atomic write size (512 bytes). Service checks results
may get lost or mangled!",sizeof(service_message));
temp_buffer[sizeof(temp_buffer)-1]=3D'\x0';
write_to_logs_and_console(temp_buffer,
NSLOG_VERIFICATION_WARNING,TRUE);
warnings++;
}
There has been some discussion about changing=20
MAX_PLUGINOUTPUT_LENGTH on this list bofore, I think.=20
I found these two links to be interesting:
https://sourceforge.net/mailarchive/mes ... =3D6783947
http://article.gmane.org/gmane.network. ... 3Dipc+size
They suggest that this value is related to the=20
BUF_SIZE setting of the OS.
If MAX_PLUGINOUTPUT_LENGTH has been bumped by 1000 bytes on a
custom install, I am wondering if this warning message can be=20
ignored on a modern Linux system - from looking at=20
include/linux/limits.h on a kernel tree and=20
/usr/include/linux/limits.h, it appears that Linux uses a=20
BUF_SIZE of 4096, well past the POSIX requirement of 512
bytes..
Can I just change base/config.c to reflect this before
compiling Nagios ? In other words, change the 512 on this line:
if(sizeof(service_message)>512){
Additionally, is it safe to increase this value to, say,
10000 or so bytes ? Or is that an absolute no-go under
any circumstances.
Thanks in advance,
Karim
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
When changing the value of MAX_PLUGINOUTPUT_LENGTH in include/objects.h,
the pre flight check prints out a warning message about the
size of the service_message struct being longer than the
POSIX-guaranteed
atomic write size. This is the actual code in base/config.c:
/*****************************************/
/* check sanity of service message size... */
/*****************************************/
if(sizeof(service_message)>512){
snprintf(temp_buffer,sizeof(temp_buffer),
"Warning: Size of service_message struct (%d bytes) is >
POSIX-guaranteed atomic write size (512 bytes). Service checks results
may get lost or mangled!",sizeof(service_message));
temp_buffer[sizeof(temp_buffer)-1]=3D'\x0';
write_to_logs_and_console(temp_buffer,
NSLOG_VERIFICATION_WARNING,TRUE);
warnings++;
}
There has been some discussion about changing=20
MAX_PLUGINOUTPUT_LENGTH on this list bofore, I think.=20
I found these two links to be interesting:
https://sourceforge.net/mailarchive/mes ... =3D6783947
http://article.gmane.org/gmane.network. ... 3Dipc+size
They suggest that this value is related to the=20
BUF_SIZE setting of the OS.
If MAX_PLUGINOUTPUT_LENGTH has been bumped by 1000 bytes on a
custom install, I am wondering if this warning message can be=20
ignored on a modern Linux system - from looking at=20
include/linux/limits.h on a kernel tree and=20
/usr/include/linux/limits.h, it appears that Linux uses a=20
BUF_SIZE of 4096, well past the POSIX requirement of 512
bytes..
Can I just change base/config.c to reflect this before
compiling Nagios ? In other words, change the 512 on this line:
if(sizeof(service_message)>512){
Additionally, is it safe to increase this value to, say,
10000 or so bytes ? Or is that an absolute no-go under
any circumstances.
Thanks in advance,
Karim
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]