Changing Event Source
-
Hi,
Is there a way to change the event source?
Here is the purpose of this request...Let's assume a server for a particular service piles up information on different entities in some log file. You are only able to install NetXMS agent on this server, not on other entities. But through the log file you can identify some status information for each entity. Now I want to parse this log file, extract the alarms and depending on the entity identified through the parsed text, I want to generate an alarm for that particular entity. So if alarm is critical, the event shall popo up in the entity alarm list and not in the server (where the log file is located) event/alarm list.
also in the event log, the node name/address shall be the one of the entity and not the one of the server.
Is there an $event->source attribute or sth similar?
BTW.: I would appreciate if you could post the list of attributes for event and node if it has changed since last time. Any other objects that event and node? What attribute?
Many thanks in advance
Best regards,Jdamien
-
Hi!
It's not possible now to change event source directly - only by resending event via external commands on behalf of different node. I'll think about built-in functionality for changing event source or easy event resending.
Best regards,
Victor -
If I may select one or the other... I would prefer a generic series of built-in fonctions to manage and produce event from within scripts.
A kind of SendEvent enabling triggering events from within NXSL scripts with all possible arguments configurable by user. And especially the source of the event
BTW: a similar command line would be powerful as well to integrate in external PERL (and Co) scripts.
Best regards,
Jdamien
-
Command line tool for integration already exist - it's called nxevent. It's available on WIndows in server and management console packages, and if you need to build it on UNIX, you must use --with-client option for configure. This tool uses client library for communication with server, and therefore requires login and password. User used for sending event must have "Send events" right on object given as source for event.
Best regards,
Victor -
This sounds great...
I tried it on Linux (I have compiled server with --with-client option). Here is the error I get:
/usr/local/netxms/bin/nxevent -u <user> -P <passwd> -o 12 <server_ipAddr> 1000009
Unable to send event: Invalid or unknown event codeCould you, please, describe a bit more the differnet parameters required. Only options are describedd in the "help" page.
Best regards,
Jdamien -
Most likely you have one extra 0 in your event code. Automatically assigned codes starts with 100000, so 100009 could be correct.
Parameters after event code are event-specific data, accessible on server via %1, %2, etc. macros and appropriate variables in NXSL scripts.
Best regards,
Victor -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login