{"id":2283,"date":"2014-07-22T09:27:00","date_gmt":"2014-07-22T08:27:00","guid":{"rendered":"http:\/\/kudzia.eu\/b\/?p=2283"},"modified":"2015-05-03T11:45:21","modified_gmt":"2015-05-03T10:45:21","slug":"service-check-did-not-exit-properly-from-nagios-plugin-in-perl","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2014\/07\/service-check-did-not-exit-properly-from-nagios-plugin-in-perl\/","title":{"rendered":"Service check did not exit properly from nagios plugin in perl"},"content":{"rendered":"<p>i&#8217;m setting up v6 on a few internet-facing servers. i&#8217;ve googled a bit and found <a href=\"https:\/\/openwiki.uninett.no\/_media\/geantcampus:dual_stack_monitoring.pdf\">dual-stack ipv4+ipv6 monitoring with nagios<\/a>. i&#8217;ve started using the wrapper script <a href=\"https:\/\/gitorious.org\/nagios-monitoring-tools\/nagios-monitoring-tools\/source\/1b6d8cbe864f8de2793e5aee378684b8edb38edc:check_v46\">check_v46<\/a> referred there and it works nicely. but i&#8217;ve run into a problem &#8211; execution of plugin gave me:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nStatus Information:\t(Service check did not exit properly)\r\n<\/pre>\n<p><!--more--><\/p>\n<p>after enabling verbose logging [ <i>debug_level=-1<\/i> and <i>debug_file=\/var\/lib\/nagios3\/nagios.debug<\/i> ] i&#8217;ve got:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;1406016950.094013] &#x5B;2048.1] &#x5B;pid=19525] **** BEGIN MACRO PROCESSING ***********\r\n&#x5B;1406016950.094021] &#x5B;2048.1] &#x5B;pid=19525] Processing: '\/usr\/local\/nagios\/check_v46 \/usr\/lib\/nagios\/plugins\/check_http -H '$ARG1$' -w '$ARG2$' -c '$ARG3$''\r\n&#x5B;1406016950.094041] &#x5B;2048.1] &#x5B;pid=19525]   Done.  Final output: '\/usr\/local\/nagios\/check_v46 \/usr\/lib\/nagios\/plugins\/check_http -H 'my.host.com' -w '10' -c '100000''\r\n&#x5B;1406016950.094048] &#x5B;2048.1] &#x5B;pid=19525] **** END MACRO PROCESSING *************\r\n&#x5B;1406016950.094054] &#x5B;064.1] &#x5B;pid=19525] Making callbacks (type 13)...\r\n&#x5B;1406016950.094109] &#x5B;016.1] &#x5B;pid=19525] Check result output will be written to '\/var\/lib\/nagios3\/spool\/checkresults\/checkAR8UWL' (fd=7)\r\n&#x5B;1406016950.094236] &#x5B;016.1] &#x5B;pid=19525] ** Using Embedded Perl interpreter to run service check...\r\n&#x5B;1406016950.124038] &#x5B;016.0] &#x5B;pid=19525] Embedded Perl failed to compile \/usr\/local\/nagios\/check_v46, compile error **ePN failed to compile \/usr\/local\/nagios\/check_v46: &quot;Variable &quot;%opts&quot; will not stay shared at (eval 1) line 315,&quot; at \/usr\/lib\/nagios3\/p1.pl line 250.\r\n - skipping plugin\r\n&#x5B;1406016950.124304] &#x5B;001.0] &#x5B;pid=19525] handle_timed_event() end\r\n&#x5B;1406016950.124320] &#x5B;008.1] &#x5B;pid=19525] ** Event Check Loop\r\n<\/pre>\n<p>ok &#8211; that&#8217;s something to google for. i&#8217;ve found <a href=\"https:\/\/www.mail-archive.com\/nagios-users@lists.sourceforge.net\/msg07202.html\">this<\/a>.<\/p>\n<p>at this stage i don&#8217;t feel like diving into the perl code &#8211; so i&#8217;ve just changed my check definition from:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndefine command{\r\n        command_name    check_httpv46\r\n        command_line    \/usr\/local\/nagios\/check_v46 \/usr\/lib\/nagios\/plugins\/check_http -H $ARG1$ -w $ARG2$ -c $ARG3$\r\n}\r\n<\/pre>\n<p>to:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndefine command{\r\n        command_name    check_httpv46\r\n        command_line    \/usr\/bin\/perl \/usr\/local\/nagios\/check_v46 \/usr\/lib\/nagios\/plugins\/check_http -H $ARG1$ -w $ARG2$ -c $ARG3$\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>i&#8217;m setting up v6 on a few internet-facing servers. i&#8217;ve googled a bit and found dual-stack ipv4+ipv6 monitoring with nagios. i&#8217;ve started using the wrapper script check_v46 referred there and it works nicely. but i&#8217;ve run into a problem &#8211; execution of plugin gave me: Status Information: (Service check did not exit properly)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[84],"class_list":["post-2283","post","type-post","status-publish","format-standard","hentry","category-unimportant","tag-nagios"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/2283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=2283"}],"version-history":[{"count":4,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/2283\/revisions"}],"predecessor-version":[{"id":2501,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/2283\/revisions\/2501"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=2283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=2283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=2283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}