Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

N

nisross

@nisross
Unfollow Follow
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to cancel a timer used to daly email notification via NXSL.
    N nisross
    Support

    Hi Filipp

    Thanks for the tip. And yes there was a space.

    Ross


  • How to cancel a timer used to daly email notification via NXSL.
    N nisross
    Support

    Hi Victor

    Thanks for the assistance. Modified code and EPP below. For some reason the timer cancellation doesn't get applied though, i.e., Node Down Email is still sent. %1 is expanded and sent correctly as displayed in event log, i.e., nodetimer_0x0000364. Any pointers appreciated.

    Regards

    Ross

    interval = 300;
    timestamp = ExpandString("timestamp_%i",$node);
    if (ReadPersistentStorage(timestamp) != "" ) {
    	if ((time() - ReadPersistentStorage(timestamp)) > interval) return true;
    	WritePersistentStorage(timestamp, NULL);
    	alarmkey = ExpandString("NODE_DOWN2_%i",$node);
    	alarm = FindAlarmByKey(alarmkey);
    	timer = ExpandString("nodetimer_%i",$node);
    	PostEvent($node,"CANCEL_TIMER",null,timer);
    	alarm->terminate();
    	return false;
    }
    

    netxms_567script.JPG


  • How to cancel a timer used to daly email notification via NXSL.
    N nisross
    Support

    Hi all

    We are currently running 3.8.366 and was wanting to implement a script that would supress node down and node up emails within a specified down time period, e.g., 5 minutes. I've basically sussed things out but have no idea how to cancel the timer, nodetimer_%i, used to delay the node down email. Any advice would be greatly appreciated.

    interval = 300;
    nodeId = d2x($node->id,8);
    a = ("timestamp_0x".nodeId);
    if (ReadPersistentStorage(a) != "" ) {
    	if ((time() - ReadPersistentStorage(a)) > interval) return true;
    	WritePersistentStorage(a, NULL);
    	alarm = FindAlarmByKey("NODE_DOWN2_0x".nodeId);
    	timer = ("nodetimer_0x".nodeId);
    	$event->setNamedParameter(timer, "");
    	alarm->resolve();
    	return false;
    }
    

    netxms_5and6script.JPG

  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups