Dear Folks, I am writing with some notes about the state of embedded Perl in Nagios 2.3.x
It seems to me that the situation is this 1 There are no problems with the embedded Perl implementation in Nagios 2.3.x (apart from those documented, namely the memory leak). 2 The different behaviour of Perl plugins with embedded Perl between 2.3.x and 2.0 _may_ have been caused by the Nagios 2.0 binary not in fact having an embedded Perl interpreter (so that all the Perl plugins were run in their own freshly forked copy of Perl). This has been the case for two of the problem reporters. 3 The plugins having problems are recognised (by me at least) as being problematic with embedded Perl These plugins are 3.1 check_ntp: signal handler should be set in an eval { } block. 3.2 contrib/ plugins such as check_ciscotemp.pl: undeclared variables. These plugins, like any Perl plugin that is not coded explicity for embedding, do not play well with embedded Perl. (FYI http://nagios.sourceforge.net/docs/2_0/embeddedperl.html talks about some of the challenges. BTW, the way for anyone to test their Perl plugins with embedded Perl Nagios is to run the plugin against new_mini_epn) Probably I should submit a patch to check_ntp to the plugin team. On a semi-related matter, those that use embedded Perl and develop their own plugins - particuarly those that make use of Perl objects - may be interested in this observation: there is probably _no_ need for a plugin to reconstruct a Perl object each time it runs if it is going to be used by an embedded Perl interpreter such as ePN. Since Perl modules invariably construct objects by 1 allocating memory 2 returning a reference (pointer) to that memory the construct an object each time in ePN may be responsible for the biggest part of the memory leak. I have yet to try if conditional object construction with ePN actually works and is helpful but it should be as easy as - $p = Dhcp->new($release_pkt) ; + $p = Dhcp->new($release_pkt) unless $p ; Since the object invariably only caches identity this shouldn't change the plugin operation. We will see. Yours sincerely. ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null