tharsdorf

Trying create an alarm using Perl PDS

Discussion created by tharsdorf on Jul 22, 2010
Latest reply on Jul 22, 2010 by tharsdorf

Hello,

i'm trying to build a Perlscript which sends an alarm into the NimBUS.
I need to build the head myself, using PDS or something similar.

The Problem is, my PDS will not create a header. I tried to give a value
for "pri", the log said "could not get 'pri' from head PDS".

Anybody knows how to build the header in a correct way?

Tim


########################   Perl   ########################

#!/opt/nimbus/bin/perl

use Nimbus::API;
use Nimbus::CFG;
use Nimbus::smileytongue:DS;
use Nimbus::smileyfrustrated:ession;

my $username="USER";
my $password="xxxPASSxxx";

nimLogin($username, $password);

  my $pds_snd = pdsCreate();
   pdsPut_PCH($pds_snd, "subject", "alarm");
   pdsPut_INT($pds_snd, "pri", 5);
   pdsPut_PCH($pds_snd, "prid", "perlscript");
   pdsPut_PCH($pds_snd, "nimid", "MM93135124-35191");

nimNamedRequest("spooler", "post", $pds_snd, 10);


########################   LOG   ########################

 spooler: got MSG on session 0x7ff314002590
 spooler: RREQUEST: post <-172.19.60.27/49832  h=256 d=80
 spooler:  head   mtype=100 cmd=post seq=0 ts=1279801208 frm=172.19.60.27/49832
 spooler:  head   tout=10 addr=spooler sid=GhboozMJ/BASe7I5ED61VgADMTI3OTgyMjgwNQFob25pbXFzLWJlZmUwMQEyMTg2
 spooler:  data   subject=alarm pri=5 prid=perlscript nimid=MM93135124-35191
 spooler: DISPATCHING post           , user-data (80 bytes)
 spooler: post - could not get 'pri' from head PDS

Outcomes