Management Software

Reply
New Contributor
Posts: 3
Registered: ‎06-07-2012

Network Advisor Event Policy Not Launching Script

Hey I am trying to launch a script in the Action Policy section of Network Advisor 11.1.3 and I am getting the error: Event Action Failed : Error while launching a script.

Here is the script it runs fine on it's own: test.bat

@echo off

C:\Perl\bin\perl.exe output.pl

E-mails work fine. Is there a chance I need a Fabric Watch license?

New Contributor
Posts: 3
Registered: ‎06-07-2012

Re: Network Advisor Event Policy Not Launching Script

I have it setup to not send arguments just for testing (with arguments gives the same error).

Here is the perl script:

#!/usr/bin/perl

use strict;

# This gets the local time.  This might only work on Linux

my $localtime = localtime;

#sets timezone

#$ENV{TZ} = 'America/Chicago';

# This opens a log file

# The name and location of the log file needs to be determined

open LOG, ">>", "C:\\Temp\\output.log" || die "cannot open log file";

# print the local time to the log

print LOG "$localtime";

# This will loop through every argument sent to this script

# It will print each argument to the file

foreach my $argument (@ARGV) {

           

            # remove new line characters

            chomp($argument);

           

            # print to the file comma separated

            print LOG ",$argument";

}

# add a new line to the file

print LOG "\n";

# close the log file

close LOG;

exit;

Super Contributor
Posts: 635
Registered: ‎04-12-2010

Re: Network Advisor Event Policy Not Launching Script

Hello Jonathan,

why do you start first a batch file to start later on a Perl script?

What is the result if you run the Perl script directly in the "Launch a Script" section?

If I find some time today I will have a check on this.

Andreas

Super Contributor
Posts: 635
Registered: ‎04-12-2010

Re: Network Advisor Event Policy Not Launching Script

I have checked this on a Linux BNA server and it works as designed.

But I use no wrapper around the perl script.

My assumption is that your error is in the batch file. You have to specify the path to the script.

You should specify something like this:

c:\perl\bin\perl.exe c:\bna_scripts\output.pl

I hope this answers your question. If yes please mark the thread as answered. This will may help others in finding answers without posting questions.

Regards,

Andreas

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.

Click to Register
Download FREE NVMe eBook