In the course of my monitoring work earlier this week I needed to install NRPE on AIX 5.3, but this was no ordinary install it involved working with one of our vendors. Often remote installations are hazardous to your sanity but luckily the Unix administrators I got to work with were extremely knowledgeable and it all went pretty smooth, there was however one minor technical sticking point… during the compile we got this message:
gcc -g -O2 -DHAVE_CONFIG_H -c ./snprintf.c gcc -g -O2 -DHAVE_CONFIG_H -o nrpe nrpe.c utils.c acl.c -lnsl ./snprintf.o nrpe.c: In function 'get_log_facility': nrpe.c:626: error: 'LOG_FTP' undeclared (first use in this function) nrpe.c:626: error: (Each undeclared identifier is reported only once nrpe.c:626: error: for each function it appears in.) make: 1254-004 The error code from the last command is 1.
Uh oh. However as you can probably guess given this post is prefixed with Quick Fix, it’s not a particularly hard error to resolve. Open up the nrpe.c source file from your nrpe tar and edit as follows:
/* Go to line 626 Replace this line */ log_facility=LOG_FTP; /* With this one */ log_facility=LOG_DAEMON;
Once you get a little dirty with some C and replace that line it should compile just fine. It’s also worth mentioning that if you are installing it with SSL then you need to have libopenssl 0.9.8 or higher and you may need to specify -with-ssl=/path/to/libssl.so when you run the configure.
The reason I haven’t done a full install guide here is that this is covered pretty well by this below blog post and official Nagios install document:comments powered by Disqus