{"id":1223,"date":"2009-10-05T15:03:25","date_gmt":"2009-10-05T20:03:25","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=1223"},"modified":"2009-11-30T17:26:59","modified_gmt":"2009-11-30T22:26:59","slug":"nagios-3","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=1223","title":{"rendered":"Nagios 3 on Cygwin"},"content":{"rendered":"<p>Don&#8217;t think Nagios can be fully built on Cygwin. I still have one compile error related to ICMP include files. Basically, Cygwin doesn&#8217;t have a valid ICMP port and icmp.h file is empty. Other than that, I got it to build and run thanks to all the related discussions out there.<\/p>\n<span id=\"Install_on_Cygwin\"><h1>Install on Cygwin<\/h1><\/span>\n<span id=\"Solutions_for_8220error:_storage_size_of_8216hints8217_isn8217t_known8221_Error\"><h2>Solutions for &#8220;error: storage size of &#8216;hints&#8217; isn&#8217;t known&#8221; Error<\/h2><\/span>\n<p>* Download cygwin-1.5.25-15-ipv6-0.23.zip from <a href=\"http:\/\/\">http:\/\/win6.jp\/Cygwin\/<\/a>.<br \/>\n* Unzip at Cygwin root diretory.<\/p>\n<pre lang=\"bash\">\r\ncd \\\r\nunzip cygwin-1.5.25-15-ipv6-0.23.zip\r\ncd cygwin-1.5.25-15-ipv6-0.23\r\ntar cvf ipv6.tar bin lib usr\r\ncp ipv6.tar ..\r\ncd ..\r\ntar xvf ipv6.tar\r\ncd bin\r\nmv cygwin1.dll cygwin1.dll.old\r\nmv new-cygwin1.dll cygwin1.dll\r\n<\/pre>\n<span id=\"Download_and_Install\"><h2>Download and Install<\/h2><\/span>\n<span id=\"Install_Cygwin_dependencies\"><h3>Install Cygwin dependencies<\/h3><\/span>\n<p>* Graphics\/gd<br \/>\n* Graphics\/jpeg<br \/>\n* Graphics\/libgd-devel<br \/>\n* Graphics\/libpng<br \/>\n* Web\/Apache2<br \/>\n* Web\/Apache2-devel<\/p>\n<span id=\"Compile_and_Install_Nagios_Core\"><h3>Compile and Install Nagios Core<\/h3><\/span>\n<p>* Download Nagios core from <a href=\"http:\/\/www.nagios.org\/download\/\">http:\/\/www.nagios.org\/download\/<\/a><\/p>\n<pre lang=\"bash\">\r\nmkdir -p \/opt\/nagios \/etc\/nagios \/var\/nagios\r\ncd \/cygdrive\/c\/sw\/nagios\/\r\ngunzip nagios-3.2.0.tar.gz\r\ntar xf nagios-3.2.0.tar\r\ncd nagios-3.2.0\r\nsh configure \\\r\n    --prefix=\/opt\/nagios \\\r\n    --sysconfdir=\/etc\/nagios \\\r\n    --localstatedir=\/var\/nagios \\\r\n    --libexecdir=\/opt\/nagios\/plugins \\\r\n    --with-nagios-user=ming-lj\\\r\n    --with-nagios-group=mkgroup-l-d \\\r\n    --with-command-group=mkgroup-l-d \\\r\n    --with-mail=\/usr\/sbin\/ssmtp.exe \\\r\n    --enable-cygwin\r\n# Comment out all occurrences of modules in MakeFile file to avoid helloworld.c error.\r\nmake all\r\nmake install\r\nmake install-commandmode\r\nmake install-config\r\n<\/pre>\n<span id=\"Download_and_Install_Nagios_Plug-ins\"><h3>Download and Install Nagios Plug-ins<\/h3><\/span>\n<p>* Install Cygwin dependencies<br \/>\n&#8211; System\/procps. This is needed since Cywin ps command is not compatible to Linux ps command (procps does).<br \/>\n&#8211; System, Net\/ping<br \/>\n* Download Nagios plug-ins from <a href=\"http:\/\/www.nagios.org\/download\/plugins\/\">http:\/\/www.nagios.org\/download\/plugins\/<\/a><\/p>\n<pre lang=\"bash\">\r\ngunzip nagios-plugins-1.4.14.tar.gz\r\ntar xf nagios-plugins-1.4.14.tar\r\ncd cd nagios-plugins-1.4.14\r\n\r\n# Global replace 127.0.0.1 to 64.233.169.99 which is for www.google.com. This is needed in order for ping to succeed.\r\n\r\nsh configure \\\r\n    --prefix=\/opt\/nagios \\\r\n    --sysconfdir=\/etc\/nagios \\\r\n    --localstatedir=\/var\/nagios \\\r\n    --libexecdir=\/opt\/nagios\/plugins \\\r\n    --with-nagios-user=Ming-LJ \\\r\n    --with-nagios-group=mkgroup-l-d \\\r\n    --with-ipv6=no \\\r\n    --with-ps-command=\"`which procps` -eo 's uid pid ppid vsz rss pcpu etime comm args'\" \\\r\n    --with-ps-format='%s %d %d %d %d %d %f %s %s %n' \\\r\n    --with-ps-cols=10 \\\r\n    --with-ps-varlist='procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos'    \r\n  \r\n#####################\r\n# Edit plugins\/Makefile          \r\n# Move negate$(EXEEXT) urlize$(EXEEXT) to the end\r\n# Append $(EXEEXT) to check_dns, check_by_ssh, check_swap, check_nt\r\n#####################\r\nlibexec_PROGRAMS = check_apt$(EXEEXT) check_cluster$(EXEEXT) \\\r\n  check_disk$(EXEEXT) check_dummy$(EXEEXT) check_http$(EXEEXT) \\\r\n  check_load$(EXEEXT) check_mrtg$(EXEEXT) \\\r\n  check_mrtgtraf$(EXEEXT) check_ntp$(EXEEXT) \\\r\n  check_ntp_peer$(EXEEXT) check_nwstat$(EXEEXT) \\\r\n  check_overcr$(EXEEXT) check_ping$(EXEEXT) check_real$(EXEEXT) \\\r\n  check_smtp$(EXEEXT) check_ssh$(EXEEXT) check_tcp$(EXEEXT) \\\r\n  check_time$(EXEEXT) check_ntp_time$(EXEEXT) check_ups$(EXEEXT) \\\r\n  check_users$(EXEEXT) check_procs$(EXEEXT) check_nagios$(EXEEXT) \\\r\n  check_dns$(EXEEXT) check_by_ssh$(EXEEXT) check_swap$(EXEEXT) check_nt$(EXEEXT) \\\r\n  negate$(EXEEXT) urlize$(EXEEXT)\r\n\r\n#####################\r\n# Add to plugins\/config.h file #\r\n#####################\r\n#define PS_COLS 10\r\n#define PS_COMMAND \"\/usr\/bin\/procps -eo 's uid pid ppid vsz rss pcpu etime comm args'\"\r\n#define PS_FORMAT \"%s %d %d %d %d %d %f %s %s %n\"\r\n#define PS_USES_PROCETIME \"yes\"\r\n#define PS_VARLIST procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos\r\n#define PING_COMMAND \"\/usr\/bin\/ping\"\r\n\r\nmake -i all\r\nmake -i install\r\n<\/pre>\n<span id=\"References\"><h1>References<\/h1><\/span>\n<p><a href=\"http:\/\/www.debianhelp.co.uk\/nagiosinstall.htm\">http:\/\/www.debianhelp.co.uk\/nagiosinstall.htm<\/a><br \/>\n<a href=\"http:\/\/nagios.sourceforge.net\/docs\/3_0\/toc.html\">http:\/\/nagios.sourceforge.net\/docs\/3_0\/toc.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Don&#8217;t think Nagios can be fully built on Cygwin. I still have one compile error related to ICMP include files. Basically, Cygwin doesn&#8217;t have a valid ICMP port and icmp.h file is empty. Other than that, I got it to &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=1223\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[60,33],"tags":[],"class_list":["post-1223","post","type-post","status-publish","format-standard","hentry","category-cygwin","category-unix"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-jJ","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1223"}],"version-history":[{"count":27,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1223\/revisions"}],"predecessor-version":[{"id":1381,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1223\/revisions\/1381"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}