integrated some more std options with lib
7e42253f
Hari Sekhon
committed
1 changed file
check_aql_sms_credits.pl
/check_aql_sms_credits.pl-6+5
/check_aql_sms_credits.pl
Add comment 29 my $aql_user;
Add comment 30 my $aql_password;
Add comment 31
Add comment 32 Plus  env_creds("AQL", "AQL account");
Add comment 33 Plus  
Add comment 32 34 %options = (
Add comment 33 Minus   "u|user=s" => [ \$aql_user, "AQL account user (\$AQL_USER environment variable)" ],
Add comment 34 Minus   "p|password=s" => [ \$aql_password, "AQL account password (use \$AQL_PASSWORD environment variable instead to prevent this showing in the process list)" ],
Add comment 35 Minus   "w|warning=s" => [ \$warning, "Warning threshold or ran:ge (inclusive)" ],
Add comment 36 Minus   "c|critical=s" => [ \$critical, "Critical threshold or ran:ge (inclusive)" ],
Add comment 35 Plus   %useroptions,
Add comment 36 Plus   %thresholdoptions,
Add comment 37 );
Add comment 38
Add comment 39 Minus  env_creds("AQL");
Add comment 39 Plus  get_options();
Add comment 40
Add comment 41 Minus  get_options;
Add comment 42 41 $aql_user = validate_user($aql_user);
Add comment 43 42 $aql_password = validate_password($aql_password);
Add comment 44 43 validate_thresholds(1, 1, { "simple" => "lower", "integer" => 1 } );