����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 3.14.248.120 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /usr/lib64/nagios/plugins/base/ |
Upload File : |
#!/usr/bin/env perl use warnings; use autodie; use Carp; use Getopt::Long; sub usage { print <<"END_USAGE"; Usage: $0 [ options ] Options: --container - container name within to execute plugin --plugin - plugin name to execute --plugin_path - plugin prefix path withour slashes ( default base ) --params - params sends to plugin END_USAGE exit 1; } my ( $interface, $interval ); GetOptions( 'container=s' => \$container, 'plugin=s' => \$plugin, 'plugin_path=s' => \$prefix, 'params=s' => \$params, ) || usage; $params //= ''; croak "need to specify container within to execute plugin" if !$container; croak "specified container not exists" if !`docker inspect $container`; croak "need to specify plugin to execute" if !$plugin; $prefix //='base'; my $plugin_path = "/usr/lib64/nagios/plugins/$prefix/check_$plugin"; system("docker exec $container $plugin_path $params"); exit $? >> 8;