Server Management - Systems Insight Manager
1833784 Members
4618 Online
110063 Solutions
New Discussion

Custom Command not working as expected.

 
Rob Buxton
Honored Contributor

Custom Command not working as expected.

Any chance of someone telling me what I might be doing wrong.

I've tried to call a perl script.
I've set it up under the Custom Commands.
If I run the perl script manually it works and similar scripts work on our CIM 7 Server.

The script should fire when a Major Event is detected, I trigger that with a generic trap from the HP Agents GUI.

I do not have any Environemt Variables set in the Custom Task, but my understanding is that the standard variables are passed as they are in CIM 7.
The following is an extract from the mx.log and the perl script follows that.

@!@,2004-01-16 08:59:05 NZDT,JOB,PROGRESS,START,JOB,19433_aegis.wcc.govt.nz,VERBOSE,wcc\buxton2r,,,
Running Tool:IM_perl_Major_event
Expanded Command Line:d:\perl\bin\perl d:\perl_scripts\IM_Major_event.pl
Targets:
aegis.wcc.govt.nz
Run As User UID:wcc\buxton2r

@!@,2004-01-16 08:59:05 NZDT,JOB,PROGRESS,START,JOB,19433_aegis.wcc.govt.nz:aegis.wcc.govt.nz,DETAIL,wcc\buxton2r,,,
Running Tool:IM_perl_Major_event

@!@,2004-01-16 08:59:10 NZDT,CONFIG,FAILURE,LIST,TASK,IM Major Event _0.0,ERROR,wcc\buxton2r,21,868863417,Rob Buxton
The name "IM Major Event _0.0" does not represent a object in this system.
@!@,2004-01-16 08:59:05 NZDT,JOB,FAILURE,DONE,JOB,19433_aegis.wcc.govt.nz:aegis.wcc.govt.nz,ERROR,wcc\buxton2r,,,
Running Tool:IM_perl_Major_event

@!@,2004-01-16 08:59:26 NZDT,CONFIG,FAILURE,LIST,TASK,IM Major Event _0.0,ERROR,wcc\buxton2r,21,868863841,Rob Buxton
The name "IM Major Event _0.0" does not represent a object in this system.

Perl script follows:
use Env;

open MAILTMP, '>mailmajor.tmp';
print MAILTMP "$NOTICEPLAINTEXT";
close MAILTMP;

system "blat mailmajor.tmp -to \"Rob.Buxton\" -subject \"HPSIM - Major Event \" \n";
#unlink 'mailmajor.tmp';
close MAILDIST;
exit;