Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Much more clean and simple!

opEvents gt 3.2.4 - Sending an event to NMIS 

It is also possible to send an event to NMIS using nmisx object: 

Code Block
    my $OPE = OMK::opEvents->new(config => $confCommon,
								logprefix => "Plugin::TestPlugin, ",
								log => $logger);
	$OPE->getDb();

	my $nmisx = $OPE->{nmisx};
	my $event = {
		node => "asgard-local",
		event => "Event from opEvents plugin",
		element => "plugin",
		details => "Event from opEvents plugin details",
		level => 8
	};
	my $response = $nmisx->createNmisEvent(event => $event);
	$OPE->log->info("MYParserPlugin:: Response: \n" . Dumper($response));


Getting events: getEventLogsModel

...