Cygwin Nagios Plugins
All plugins are from http://nagios-plugins.org/ and are compiled with Cygwin 2.844 32bit. The plugins are compiled as static binaries to run without the Cygwin environment.
Some plugins will not compile under Cygwin like check_icmp
. The plugin will fail because of the missing icmp.h definitions. The definitions are not implemented because ICMP needs raw sockets, which only work as administrator.
Other plugins might compile but do not work, like check_disk
or check_users
.Â
If anybody knows how to compile all modules just leave a comment.
Install Cygwin 2.844 32bit including the packages: gcc-core, libiconv, libkrb5-devel, libmysqlclient-devel, make, mysql, openssh, openssl-devel, ping, procps, zlib-devel Â
tar xzf nagios-plugins-2.0.tar.gz
cd nagios-plugins-2.0Â
CFLAGS=-static ./configure --with-ps-command="$(which procps) -eo 's uid pid ppid vsz rss pcpu etime comm args'" --with-ps-format='%s %d %d %d %d %d %f %s %s %n' --with-ps-cols=10 --with-ps-varlist='procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos' --with-ping-command="ping %s 56 %d"
In the libexec_PROGRAMS
secition of Makefile add the word $(EXEEXT) to all checks, e. g.
check_mysql check_mysql_query check_procs ... => check_mysql$(EXEEXT) check_mysql_query$(EXEEXT) check_procs$(EXEEXT) ...
vi plugins/Makefile  C_INCLUDE_PATH=$(pwd):$(pwd)/lib:$(pwd)/gl:/usr/include/mysql/:$C\_INCLUDE_PATH make -iÂ
These cygwin libs are needed to run the plugins: cygcrypto-1.0.0.dll cyggcc_s-1.dll cygmysqlclient-18.dll cygssl-1.0.0.dll cygwin1.dll cygz.dll
Â