diff --git a/plugins/mythtv/mythtv_status_ b/plugins/mythtv/mythtv_status_ index 91f464f8..ca2f1774 100755 --- a/plugins/mythtv/mythtv_status_ +++ b/plugins/mythtv/mythtv_status_ @@ -71,7 +71,8 @@ #%# family=auto #%# capabilities=autoconf use DBI; -use MythTV; +eval 'use MythTV; 1;' + or die 'Please install MythTV'; use strict; use warnings; use Munin::Plugin; diff --git a/plugins/system/raminfo b/plugins/system/raminfo index 64838178..9b4360a8 100755 --- a/plugins/system/raminfo +++ b/plugins/system/raminfo @@ -73,7 +73,8 @@ else sub value # get value for variables { my %h_ramvalues; - use Sun::Solaris::Kstat; + eval 'use Sun::Solaris::Kstat; 1;' + or die 'Please install Sun::Solaros::Kstat'; my $Kstat = Sun::Solaris::Kstat->new(); # --- Fetch Hardware info --- diff --git a/plugins/system/swapspace-info b/plugins/system/swapspace-info index 91cc3a28..afa6e6cd 100755 --- a/plugins/system/swapspace-info +++ b/plugins/system/swapspace-info @@ -71,7 +71,8 @@ else sub value { my %h_swapvalue; - use Sun::Solaris::Kstat; + eval 'use Sun::Solaris::Kstat; 1;' + or die 'Please install Sun::Solaris::Kstat'; my $Kstat = Sun::Solaris::Kstat->new(); # --- Fetch Hardware info --- diff --git a/plugins/virtualization/vmware/esx_ b/plugins/virtualization/vmware/esx_ index 003eac27..01577285 100755 --- a/plugins/virtualization/vmware/esx_ +++ b/plugins/virtualization/vmware/esx_ @@ -115,9 +115,14 @@ use strict; use sort 'stable'; # guarantee stability no warnings; # don't want warnings in output -use VMware::VIRuntime; # need to install VIM SDK (vSphere CLI/SDK 4.1 or newer) -use VMware::VILib; -use VMware::VIExt; +# need to install VIM SDK (vSphere CLI/SDK 4.1 or newer) +eval 'use VMware::VIRuntime; 1;' + or die 'Please install vSphere SDK for VMware::* modules'; +eval 'use VMware::VILib; 1;' + or die 'Please install vSphere SDK for VMware::* modules'; +eval 'use VMware::VIExt; 1;' + or die 'Please install vsphere SDK for VMware::* modules'; + use Data::Dumper; use DateTime::Format::ISO8601; # may need to install "libdatetime-format-iso8601-perl" on Debian-based systems use List::Util qw(sum max);