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

  1. Home
  2. Support
  3. How can I put original message inside of email alert

How can I put original message inside of email alert

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 30.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U
    U
    umit
    wrote on last edited by
    #1

    In the below example I am able to send email after match condition. But How can I put original message inside of email alert.

    For example : I want to send below original syslog text to email ... 

    24.04.2015 12:22:15 1 5 system,error,critical login failure for user testUser from 11.2.33.41 via ssh

    We can extract username and login method from the syslog message, and pass it as parameters to an event with the following rule:
    <match>system,error,critical login failure for user (.*) from .* via (.*)</match>
    <event params="2">10000</event>

    1 Reply Last reply
    0
    • M
      M
      MarcusH
      wrote on last edited by
      #2

      I format mail body with script, event calls mail action and mail action is calling script with %[scriptname] in message text.

      if you want event param 2 use $event->parameters[2] in script

      Create a string variable with all the text you want then just return it and it will use that for the mail text, for line break use \n

      If you are scripting you have access to these to get the data you want also:
      https://wiki.netxms.org/wiki/NXSL_Function_Reference

      1 Reply Last reply
      0

      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
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • 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