VMware VCENTER APPLICATION DISCOVERY MANAGER 6.1 - REPOSITORY Especificaciones Pagina 175

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 309
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 174
my $timestamp;
my $alertId;
my $loginToken;
get_args();
my $client = Hyper9::Client->new( host => 'localhost:8983', );
#$client->{services_path} = '/single-vm';
$client->loginWithToken( username => 'admin', token => $loginToken, ) ||
die "Login failed\n\n";
my $alert = $client->getWorkspaceAsset(assetId=>$alertId);
$client->logout();
my $status = ($alert->{raised} eq 'true') ? "RAISED" : "LOWERED";
open( LOG, ">>logAlert.log" );
print LOG $timestamp."\t".$alert->{name}."\t$status\t".$alert->
{value}."\n";
close(LOG);
sub get_args
{
my $help;
GetOptions(
"timestamp:i" => \$timestamp,
"alertId:s" => \$alertId,
"loginToken:s" => \$loginToken,
"help" => \$help,
"h" => \$help,
);
usage() if ( $help || !($alertId) );
}
sub usage
{
print STDERR << "EOF";
usage: $0 -timestamp=1271186678 -alertId=404cb4f0-4732-11df-9879-
0800200c9a66
-loginToken=62b796e0-4732-11df-9879-0800200c9a66
-timestamp : seconds since epoch
-alertId : hyper9 ID of the alert
-loginToken : a token that can be used to login to the hyper9 web
service
EOF
exit;
}
The following arguments are passed to all commands:
175
Example Action
Vista de pagina 174
1 2 ... 170 171 172 173 174 175 176 177 178 179 180 ... 308 309

Comentarios a estos manuales

Sin comentarios