{"id":1286,"date":"2009-10-11T20:46:21","date_gmt":"2009-10-12T01:46:21","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=1286"},"modified":"2009-10-11T21:04:34","modified_gmt":"2009-10-12T02:04:34","slug":"integrate-webinject-with-nagios","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=1286","title":{"rendered":"Integrate Webinject with Nagios"},"content":{"rendered":"<p>* <a href=\"?p=1272\">Install Nagios<\/a><br \/>\n* Login as user nagios before install Webinject. Otherwise you&#8217;ll get a &#8220;Return code of 13 is out of bounds&#8221; error from Nagios. In that case do:<\/p>\n<pre>\r\nchown -R nagios:nagios webinject\/\r\n<\/pre>\n<p>* <a href=\"?p=1085\">Install Webinject<\/a><br \/>\n* Set reporttype to nagios in webinject\/config.xml<\/p>\n<pre lang=\"xml\">\r\n<testcasefile>testcases.xml<\/testcasefile>\r\n<useragent>WebInject Application Tester<\/useragent>\r\n<timeout>10<\/timeout>\r\n<globaltimeout>20<\/globaltimeout>\r\n<reporttype>nagios<\/reporttype>\r\n<\/pre>\n<p>* Setup test cases in webinject\/testcases.xml<br \/>\n* Define a webinject command in \/usr\/local\/nagios\/etc\/objects\/commands.cfg<\/p>\n<pre>\r\n# 'webinject' command definition\r\ndefine command {\r\n    command_name    webinject\r\n    command_line    \/usr\/local\/nagios\/webinject\/webinject.pl -c $ARG1$ $ARG2$\r\n<\/pre>\n<p>* Define a service in \/usr\/local\/nagios\/etc\/objects\/localhost.cfg<\/p>\n<pre>\r\ndefine service {\r\n    use                      generic-service\r\n    host_name                localhost # Modify\r\n    service_description      WebInject test of MyApplication\r\n    is_volatile              0\r\n    check_period             24x7\r\n    max_check_attempts       3\r\n    normal_check_interval    1\r\n    retry_check_interval     1\r\n    contact_groups           admins # Modify\r\n    notification_interval    120\r\n    notification_period      24x7\r\n    notification_options     w,u,c,r\r\n    check_command            webinject!config.xml!testcases.xml # Modify\r\n}\r\n<\/pre>\n<p>* Restart Nagios<\/p>\n","protected":false},"excerpt":{"rendered":"<p>* Install Nagios * Login as user nagios before install Webinject. Otherwise you&#8217;ll get a &#8220;Return code of 13 is out of bounds&#8221; error from Nagios. In that case do: chown -R nagios:nagios webinject\/ * Install Webinject * Set reporttype &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=1286\">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":[61],"tags":[],"class_list":["post-1286","post","type-post","status-publish","format-standard","hentry","category-linux"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-kK","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1286","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=1286"}],"version-history":[{"count":4,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1286\/revisions"}],"predecessor-version":[{"id":1288,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1286\/revisions\/1288"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}