Hi Guys,
wondering if someone can help me out a bit, i have a ubuntu 9.04 server installation and its a VERY minimal install of ubuntu. i have installed nagios and sendmail got it all working great so far, how ever i seem to have run into a problem and cannot find a way to fix it.
i want to monitor Mysql db’s on some of my windows hosts but when i checked /usr/local/nagios/libexec/ the check_MYSQL plugin is missing. i followed the ubuntu quickstart guide in the Nagios documentation and as a result i installed the plugins and compiled them but it seems to be missing the mysql one.
here is an output from the manual compile of the check_Mysql plugin
root@ubuntu:~/downloads/nagios-plugins-1.4.11/plugins# make check_mysql
if gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include -g -O2 -MT check_mysql-check_mysql.o -MD -MP -MF ".deps/check_mysql-check_mysql.Tpo" -c -o check_mysql-check_mysql.o `test -f 'check_mysql.c' || echo './'`check_mysql.c; \
then mv -f ".deps/check_mysql-check_mysql.Tpo" ".deps/check_mysql-check_mysql.Po"; else rm -f ".deps/check_mysql-check_mysql.Tpo"; exit 1; fi
check_mysql.c:51:19: error: mysql.h: No such file or directory
check_mysql.c:52:20: error: errmsg.h: No such file or directory
check_mysql.c:58: error: âMYSQL_PORTâ undeclared here (not in a function)
check_mysql.c: In function âmainâ:
check_mysql.c:73: error: âMYSQLâ undeclared (first use in this function)
check_mysql.c:73: error: (Each undeclared identifier is reported only once
check_mysql.c:73: error: for each function it appears in.)
check_mysql.c:73: error: expected â;â before âmysqlâ
check_mysql.c:74: error: âMYSQL_RESâ undeclared (first use in this function)
check_mysql.c:74: error: âresâ undeclared (first use in this function)
check_mysql.c:75: error: âMYSQL_ROWâ undeclared (first use in this function)
check_mysql.c:75: error: expected â;â before ârowâ
check_mysql.c:91: error: âmysqlâ undeclared (first use in this function)
check_mysql.c:93: error: âMYSQL_READ_DEFAULT_GROUPâ undeclared (first use in this function)
check_mysql.c:97: error: âCR_UNKNOWN_HOSTâ undeclared (first use in this function)
check_mysql.c:98: warning: format â%sâ expects type âchar *â, but argument 3 has type âintâ
check_mysql.c:99: error: âCR_VERSION_ERRORâ undeclared (first use in this function)
check_mysql.c:100: warning: format â%sâ expects type âchar *â, but argument 3 has type âintâ
check_mysql.c:101: error: âCR_OUT_OF_MEMORYâ undeclared (first use in this function)
check_mysql.c:102: warning: format â%sâ expects type âchar *â, but argument 3 has type âintâ
check_mysql.c:103: error: âCR_IPSOCK_ERRORâ undeclared (first use in this function)
check_mysql.c:104: warning: format â%sâ expects type âchar *â, but argument 3 has type âintâ
check_mysql.c:105: error: âCR_SOCKET_CREATE_ERRORâ undeclared (first use in this function)
check_mysql.c:106: warning: format â%sâ expects type âchar *â, but argument 3 has type âintâ
check_mysql.c:108: warning: format â%sâ expects type âchar *â, but argument 3 has type âintâ
check_mysql.c:112: warning: passing argument 1 of âstrlenâ makes pointer from integer without a cast
check_mysql.c:112: warning: passing argument 2 of âmemcpyâ makes pointer from integer without a cast
check_mysql.c:112: warning: passing argument 1 of â__strdupâ makes pointer from integer without a cast
check_mysql.c:116: error: âCR_SERVER_GONE_ERRORâ undeclared (first use in this function)
check_mysql.c:117: warning: format â%sâ expects type âchar *â, but argument 3 has type âintâ
check_mysql.c:118: error: âCR_SERVER_LOSTâ undeclared (first use in this function)
check_mysql.c:119: warning: format â%sâ expects type âchar *â, but argument 3 has type âintâ
check_mysql.c:120: error: âCR_UNKNOWN_ERRORâ undeclared (first use in this function)
check_mysql.c:121: warning: format â%sâ expects type âchar *â, but argument 3 has type âintâ
check_mysql.c:127: warning: passing argument 1 of âstrlenâ makes pointer from integer without a cast
check_mysql.c:127: warning: passing argument 2 of âmemcpyâ makes pointer from integer without a cast
check_mysql.c:127: warning: passing argument 1 of â__strdupâ makes pointer from integer without a cast
check_mysql.c:134: warning: passing argument 1 of âstrlenâ makes pointer from integer without a cast
check_mysql.c:134: warning: passing argument 2 of âmemcpyâ makes pointer from integer without a cast
check_mysql.c:134: warning: passing argument 1 of â__strdupâ makes pointer from integer without a cast
check_mysql.c:146: error: ârowâ undeclared (first use in this function)
check_mysql.c:147: warning: passing argument 1 of âstrlenâ makes pointer from integer without a cast
check_mysql.c:147: warning: passing argument 2 of âmemcpyâ makes pointer from integer without a cast
check_mysql.c:147: warning: passing argument 1 of â__strdupâ makes pointer from integer without a cast
check_mysql.c:165: error: âMYSQL_FIELDâ undeclared (first use in this function)
check_mysql.c:165: error: âfieldsâ undeclared (first use in this function)
make: *** [check_mysql-check_mysql.o] Error 1
i cannot work out what is wrong, do i need to have anything installed before hand in order to get it working? because as i say this linux install is very minimal, i am still getting my head around linux so would be really greatful if you could give nice clear replies to save confusing me
thanks
Kris
EDIT
needed to install the mysql libs to get this working and just re-run the make commands to install the plugins, all sorted and working