Add custom parameter to Event Template?
-
-
Hi,
interface alias is not passed to SYS_IF_DOWN. You can create script in script library called GetInterfaceAlias with the following code:
return GetInterfaceObject($node, $event->parameters[5])->alias;and then use macro %[GetInterfaceAlias] in message text.
Best regards,
Victor -
-
-
In version 3.0 you can set interface as related object for DCI and then access it via DCI object.
Best regards,
Victor -
I create the script GetInterfaceAlias
if ($dci==null) return "?"; else return GetInterfaceObject($node, $dci->instanceData)->alias;and using macro in message %[GetInterfaceAlias] but this return "?"
my threshold script run correctifo = GetInterfaceObject($node, $dci->instanceData); speed = ifo->speed; if (speed!=null) if ($1/speed*100 > $2) return true; return false;I'am using NETXMS 3.0.2287.
Can you tell me my mistake. -
Currently $dci is not supported when a script is called from event processing. For SYS_THRESHOLD_EVENTs DCI ID is passed as 5-th parameter of $event:
trace(1, "Script on SYS_THRESHOLD_EVENT: DCI ID: ".$event->parameters[5]+0); trace(1, "Script on SYS_THRESHOLD_EVENT: DCI name: ".GetDCIObject($node,($event->parameters[5]))->name); trace(1, "Script on SYS_THRESHOLD_EVENT: Interface name: ".GetDCIObject($node,($event->parameters[5]))->relatedObject->name);
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