Active IQ Unified Manager Discussions

Unified Manager 9.4 and json file creation


Hi folks,


I need to send a json file when an alert occur. Is there a way of doing the json file automatically ?

if i need to do it with a script, is there a way to send it with a utility....


Thank you



Re: Unified Manager 9.4 and json file creation




Assuming your OCUM is Windows based. you can use the PS i published in the following link to consume the parameters:






and use the following command to save it to a json:



$parms | ConvertTo-Json | Out-File "C:\temp\$($parms.EventID).json"





Re: Unified Manager 9.4 and json file creation


Nope, the appliance so in perl....  


#Pour initialiser les variables et assurer un standard
use warnings;
use strict;
use POSIX;

my $Notification = "Yes";
my $Ticket = "Yes";
my $Status = $ARGV[13];
my $Category = $ARGV[5];
my $Time = localtime(time);
my $Timezone = strftime("%Z", localtime());
my $AlertName = $ARGV[3];
my $AlertDesc = $ARGV[15];
my $SysOrigin = $ARGV[9];

my %file_json = ('Need_Notification' => $Notification, 'Need_Ticket'=> $Ticket, 'Status' => $Status, 'Alert_Category' => $Category, 'AlertTime' => $Time, 'AlertTime_TimeZone' => $Timezone, 'Alert_Name' => $AlertName, 'Alert_Description' => $AlertDesc, 'System_Origin' => $SysOrigin);

my $json = encode_json \%file_json;

print $json;

Earn Rewards for Your Review!
GPI Review Banner
All Community Forums