[Nagiosplug-devel] send_nsca

Joram Agten joram.agten at gmail.com
Tue Jan 18 10:05:08 CET 2011


Hello,

1.
I had a problem with send_nsca and the delimiter character.
I supplied -d ';' and then it took ' as delimiter.
but there was no warning that I supplied more than one character.

small possible improvement to the code (around line 480 in send_nsca.c)

/* delimiter to use when parsing input */
else if(!strcmp(argv[x-1],"-d")){
if(x<argc){
if(strlen(argv[x]) > strlen(delimiter)) {
    printf("only %d delimiter character(s) allowed, got %d, '%s'\n",
strlen(delimiter), strlen(argv[x]), argv[x]);
    return ERROR;
}
snprintf(delimiter,sizeof(delimiter),"%s",argv[x]);
delimiter[sizeof(delimiter)-1]='\x0';
#ifdef DEBUG
             printf("delimiter='%s'\n",delimiter);
#endif
x++;
}
else{
return ERROR;
}
}

2. Is it possible to send multi line passive service checks?

Thanks in advance
Joram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20110118/b6807e87/attachment.html>


More information about the Devel mailing list