ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

logmon - run command and generate one alarm that contains all output


Article ID: 127502


Updated On:


DX Unified Infrastructure Management (Nimsoft / UIM) NIMSOFT PROBES CA Unified Infrastructure Management On-Premise (Nimsoft / UIM) CA Unified Infrastructure Management SaaS (Nimsoft / UIM) Unified Infrastructure Management for Mainframe


Customer needs to run a command and have all of the output of the command returned in a single alarm message.


- logmon configuration


- UIM 8.51 or higher
- logmon v4.00 or higher


Listed below are some screen shots and the portion of a logmon config showing a sample profile that will run a command and generate a single alarm with all of the output from the command. You should be able to adjust it to your specific requirements. Note that for the logmon text block variable you will have to define a field separator such as either:

• New line which is specified as /n
• White space (just press the space bar to enter it)
• Carriage Return which is \r
• etc… I used a space and it worked fine

Sample alarm output (multiple lines)





Additional Information

logmon.cfg sample

      active = yes
      interval = 1 min
      scanfile = cmd /C netstat -an|findstr "4800"
      fileencoding =
      scanmode = command
      alarm = yes
      qos = yes
      message = no
      subject =
      user =
      reccur_directory = no
      reccur_directory_level = 10
      resetFile = no
      initialfileptr = 2
      resumefileptr = 4
      command_timeout_active = yes
      command_timeout = 20
      command_severity = 2
      command_timeout_alarm = yes
      alarmFOpenFail = no
      clearFOpenFailRestart = no
      monitor_exit_code = No
      max_alarm_sev = 5
      max_alarms =
      max_alarm_msg =
      password =
            active = yes
            start = *TCP*
            end = *UDP*
            lines = 0
            active = yes
            match = /[0-9A-Za-z]+/
            level = warning
            subsystemid =
            message =
            i18n_token =
            restrict = test
            expect = yes
            abort = no
            sendclear = no
            count = no
            separator =
            suppid =
            source =
            target =
            qos =
            runcommandonmatch = no
            alarm_on_first_match = no
            commandexecutable =
            commandarguments =
            pattern_threshold_severity = information
            pattern_threshold_message =
            timeout = 1
            pattern_threshold =
            expect_message = ${netstatoutput}
            expect_level =
            regexfromexternalfile = no
            patternfilepath =
            token =
            variable_threshold =
            variable_threshold_message =
            variable_threshold_severity = information
            variable_threshold_supp =
                  definition = *

Note that when you're running logmon on a Linux/Unix system, you'll have to specify the absolute path to the command being run.


1558689844802000127502_sktwi1f5rjvs16g2h.png get_app
1558689843019000127502_sktwi1f5rjvs16g2g.png get_app
1558689841274000127502_sktwi1f5rjvs16g2f.png get_app
1558689839424000127502_sktwi1f5rjvs16g2e.png get_app
1558689837662000127502_sktwi1f5rjvs16g2d.png get_app
1558689834652000127502_sktwi1f5rjvs16g2c.png get_app