I've just finished installing Nagios Core 4 I'm now trying to install the plugin for the EM01B web sensor https://www.siretta.co.uk/lan-temperatu ... p_1225.php
When I run the compile command as per the install guide I get the errors listed below. Has anyone managed to install this successfully on Nagios 4? can you point me in the right direction please?
Thanks for the help,
Ash
Code: Select all
check_em01.c: In function ‘INThandler’:
check_em01.c:258:6: warning: implicit declaration of function ‘alarm’ [-Wimplici t-function-declaration]
alarm(CONNECT_TIMEOUT);
^
check_em01.c: At top level:
check_em01.c:263:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
main(int argc, char **argv)
^
check_em01.c: In function ‘main’:
check_em01.c:277:3: warning: implicit declaration of function ‘print_help’ [-Wim plicit-function-declaration]
print_help();
^
check_em01.c:299:4: warning: implicit declaration of function ‘usleep’ [-Wimplic it-function-declaration]
usleep(5000);
^
check_em01.c:321:12: warning: implicit declaration of function ‘toupper’ [-Wimpl icit-function-declaration]
switch (toupper(argv[2][0])){
^
check_em01.c:323:3: warning: implicit declaration of function ‘write’ [-Wimplici t-function-declaration]
write(s, "GET /index.html?eR HTTP/1.1\r\nUser-Agent: EsensorsPlugin\r\nHost:
^
check_em01.c:344:7: warning: implicit declaration of function ‘read’ [-Wimplicit -function-declaration]
l = read(s, iobuf, sizeof(iobuf));
^
check_em01.c:490:12: warning: unknown conversion type character ‘|’ in format [- Wformat=]
printf("(No limits specified) %s% | Humid=%3.2f\n", datachar, data);
^
check_em01.c:494:12: warning: unknown conversion type character ‘|’ in format [- Wformat=]
printf("CRITICAL ( %s< or >%s ) Humidity: %s% | Humid=%3.2f\n", argv[5], ar
^
check_em01.c:498:12: warning: unknown conversion type character ‘|’ in format [- Wformat=]
printf("WARNING ( %s< or >%s ) Humidity: %s% | Humid=%3.2f\n", argv[3], arg
^
check_em01.c:502:12: warning: unknown conversion type character ‘|’ in format [- Wformat=]
printf("OK Humidity: %s% | Humid=%3.2f\n", datachar, data);
^
check_em01.c:546:23: warning: too many arguments for format [-Wformat-extra-args ]
fprintf(stderr, "Could not reset contact closure", NetErrStr());
^
check_em01.c: In function ‘print_help’:
check_em01.c:638:2: warning: implicit declaration of function ‘print_usage’ [-Wi mplicit-function-declaration]
print_usage ();