server crash while saving event processing policy

Started by Dani@M3T, July 15, 2014, 04:12:08 PM

Previous topic - Next topic

Dani@M3T

I inserted this filtering script in an existing event processing policy and saved the policies.
/* no alarm when node is down */
sub main()
{
   s = FindSituation("NodeDown", %n);
   if (s != NULL)
   {
   if (s->status == 1)
   return false; //don't match rule
   }
   return true; //match rule
}


Then the NetXMS server (netxmsd) crashed.
Server is V1.2.14 on Linux x64. I send the debuglog (LogLevel=9) to [email protected]

Update:
When I write the filtering script without "sub main () {" and "}" the server does not crash. Maybe a bug? Or my fault?

Victor Kirhenshtein

Hi,

your script has syntax error (in FindSituation call), and there is a bug in 1.2.14 (already fixed for 1.2.15) that may cause server to crash when compiling script with syntax error. Try to fix the script like this:


   s = FindSituation("NodeDown", $node->name);


Best regards,
Victor

Dani@M3T

Thank you Victor. So I replaced "%n" by "$node->name".
But my idea must have another problem. I tried to avoid alarms from Service.Check-DCIs (Webserver, DNS and other network services checked by subagnets and external commands from the NetXMS server as proxy node) when the correspondent node is down. But maybe the 'node down' event (which updates the situation) is after the other events. I still get all alarms  :(
When the whole node is down I want to have all events but no alarms other then the node-down-alarm.

Victor Kirhenshtein

Yes, it is possible that node down event comes after DCI threshold violation events. The reason is that data collection is not synchronized with status polls - so when node went down there is no guarantee that status poll will detect it first - so you can get some of the DCI events before SYS_NODE_DOWN. One of the possible solutions is to change number of polls required to trigger thresholds - if you set it to 2 (assuming data collection interval is the same as status polling interval) you will already have SYS_NODE_DOWN received when threshold generates event. Drawback of course is that you'll get service down notification one poll interval later.

Best regards,
Victor

Manuel Schneider

Hi,

I had same problem, but with NetXMS Server Version 2.0.8 (on Windows). The "NetXMS Core"-Service (the NetXMS Server) crashed everytime at one specific line in an event processing policy rule I created. The line looked:
s = FindSituation("ICMP_Timeout_Special", $I);

So, now I know it's a syntax error, but the server still crashes...

Best regards,
Manuel

PS.: I wonder if I missed out some WebPage where users can submit NetXMS Issues...

Victor Kirhenshtein