DX NetOps

 View Only
  • 1.  Sanitizing data sent via AlarmNotifier

    Posted Sep 04, 2019 10:45 AM
    Hi everyone,

    We're running Spectrum on Windows Server. 
    When a Set/Update/Clear alarm is raised via Alarm Notifier, we use curl for Windows to send the alarm via HTTP/HTTPS to a separate system. We need to sanitize certain characters from the alarm before sending via curl, since we've noticed that certain escape characters such as '\' can break the connection to the separate system.

    Is there anyway to easily sanitize certain characters from an alarm before Alarm Notifier sends it on its way? Perhaps within curl or perhaps via a command within the Set/Update/Clear scripts?

    Thanks!


  • 2.  RE: Sanitizing data sent via AlarmNotifier

    Posted Sep 06, 2019 03:14 AM
    Hi Dganit,

    You can use many different shell tools to address that issue.
    This is an example to replace the '\' character for '_' in a variable in SetSecript:

    VARIABLE="FOO\BAR"
    VARIABLE="${VARIABLE//\\/_}"

    Hope it helps.

    Regards,

    ------------------------------
    Marcelo Zacchi
    CA Spectrum consultant
    Nets Denmark
    ------------------------------



  • 3.  RE: Sanitizing data sent via AlarmNotifier

    Posted Sep 08, 2019 05:29 AM
    Fantastic Marcelo, thanks.