Log Monitoring for delete

About Log Monitor

Monitis Log monitor is designed for monitoring any type of log file existing on the file system – no matter if it is an application log, system log or any other .txt file used for collecting data. The monitor is supported both on Windows and Linux platforms.

Configuring Log monitor requires that you provide the full path where the log file is located and regular expressions to look up in the logs.

The Log monitor runs checks at predefined intervals of time and looks through the tail end of the log file to find matches for your specified regular expressions.

  • When you test the monitor during the setup by pressing the Test button in the wizard (see further in the document), the monitor will process the first up to 200,000 lines of the log file.
  • After the monitor is added, the first check will just fix the current end of the log file.
  • The second check will process all the lines that were logged starting from the point fixed as the end of file in the first check.
  • All the subsequent checks will process the lines logged to the file since the last check.

You can specify more than one regular expression to look up in the log file. Log monitor is a multi-value monitor, meaning that every monitoring check returns values for more than one object – in this case the result will be returned for every regex to look up in the log file.

The output of Log monitor includes:

  • Number of processed lines
  • Number of matches found in the processed lines for each regular expression specified

 

Adding Log Monitor

Adding Log Monitor for Windows

Note: You should have PowerShell 2.0 or upper version installed on the machine where Smart Agent is running.

Go to the Monitors top menu and select Application Monitors –> Log.

C:\Users\monitis_user\AppData\Roaming\Skype\garikarmenia\media_messaging\media_cache_v3\^83A0319C69EE13A5871FA1396661ADE324982ED3113647BA7C^pimgpsh_fullsize_distr.png

The Add Application Monitor – Step 1 window will open.

Add Node.js Monitor Step 1 Windows

If you have already downloaded and installed Smart Agent for Windows, select it from the Agent list.

Make sure that your Smart Agent for Windows is running, as shown under Agent Status. If the Agent is stopped, run it from the Smart Agent Controller window (see Downloading, Installing and Running Smart Agent for Windows).

Agent_Key.png

If you haven’t downloaded Smart Agent for Windows yet, click on the Download Agent button to download it. Follow the instructions under Downloading, Installing and Running Smart Agent for Windows. Note that it may take up to 5 min for newly installed Agent to appear in the agent list (you can click Refresh to refresh the agent list).

Select the Windows Agent from the list, and click Next.

The Add Application Monitor – Step 2 window will open.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-149.png

Enter the full path of the log file to process.

Provide the regular expression(s) to lookup in the file. To add more regular expressions click the green “+” button.

Note: Log monitor running on Windows uses ECMAScript syntax.

Run TEST to check the log file availability and regular expression syntax. Note again that in Test mode only the first 200,000 bytes are processed.

The test can take up to one minute to complete.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-150.png

When the test is completed, the results will appear in the same window.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-151.png

Click Add button to add the Log Monitor.

The Alert Configuration window will appear.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-152.png

  • Click Send to All Contacts if you want to send alerts for this monitor to all contacts.
  • Click Custom Configuration (Advanced) to configure sending alerts for this monitor only to selected contacts.
    The Alert Rules window will open. Click on the Add Alert Rule button to configure alert rule(s) for your monitor.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-153.png

Set up the alert rule and click Add Rule. See Alert Rules in Alerts 2.0 for more info about alert rules.

Note: To be able to add alert rules, you need to set up thresholds (Critical or Warning) in your monitor first.

A threshold includes two conditions connected by a logical OR. If any of the conditions matches the monitor will enter your specified state.

  • Result is error (response timed out, connection failure, etc)
  • Any or all of your selected metrics meet the failure conditions you specified for them

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-154.png

Select the threshold condition from the combo box.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-155.png

The Log Monitor is a multi-value monitor, so you need to select the objects to apply the metric failure condition(s) to. In this case, the objects are the regular expression patterns that you have provided for looking up in the log file.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-156.png

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-157.png

Add the metric failure conditions to be applied to your selected objects. To add more conditions press the green “+” button.

1

Click OK when finished configuring the threshold.

See Thresholds and Setting up Alerting for Multi-value Monitors in Alerts 2.0 for more info.

  • Click Don’t Send Alerts if you don’t want any alerts for this monitor to be sent.

Your newly created Log monitor will appear in your Monitis dashboard. Wait until it loads the first data.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-159.png

 

Adding Log Monitor for Linux

Go to the Monitors top menu and select Application Monitors –> Log.

C:\Users\monitis_user\AppData\Roaming\Skype\garikarmenia\media_messaging\media_cache_v3\^83A0319C69EE13A5871FA1396661ADE324982ED3113647BA7C^pimgpsh_fullsize_distr.png

The Add Application Monitor – Step 1 window will open.

Add Node.JS Monitor for Linux Step 1

If you have already downloaded and installed Smart Agent for Linux, select it from the Agent list.

Make sure that your Smart Agent for Linux is running, as shown under Agent Status. If the Agent is stopped, run it on your Linux machine (see Downloading, Installing and Running Smart Agent for Linux).

Status Monitoring Smart Agent

If you haven’t downloaded Smart Agent for Linux yet, click on the Download Agent button to download it. Follow the instructions under Downloading, Installing and Running Smart Agent for Linux. Note that it may take up to 5 min for newly installed Agent to appear in the list (you can click Refresh to refresh the agent list).

Select the Linux Agent from the list, and click Next.

The Add Application Monitor – Step 2 window will open.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-163.png

Enter the full path of the log file to process.

Provide the regular expression(s) to lookup in the file. To add more regular expressions click the green “+” button.

Note: Log monitor running on Linux uses POSIX Extended syntax for regular expressions.

Run TEST to check the log file availability and regular expression syntax. Note again that in Test mode only the first 200,000 bytes are processed.

The test can take up to one minute to complete.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-164.png

When the test is completed, the results will appear in the same window.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-165.png

  • Click Add button to add the Log Monitor.
  • The Alert Configuration window will appear.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-166.png

  • Click Send to All Contacts if you want to send alerts for this monitor to all contacts.
  • Click Custom Configuration (Advanced) to configure sending alerts for this monitor only to selected contacts.
    The Alert Rules window will open. Click on the Add Alert Rule button to configure alert rule(s) for your monitor.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-167.png

Set up the alert rule and click Add Rule. See Alert Rules in Alerts 2.0 for more info about alert rules.

Note: To be able to add alert rules, you need to set up thresholds (Critical or Warning) in your monitor first.

A threshold includes two conditions connected by a logical OR. If any of the conditions matches the monitor will enter your specified state.

  • Result is error (response timed out, connection failure, etc)
  • Any or all of your selected metrics meet the failure conditions you specified for them

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-168.png

Select the threshold condition from the combo box.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-169.png

The Log Monitor is a multi-value monitor, so you need to select the objects to apply the metric failure condition(s) to. In this case, the objects are the regular expression patterns that you have provided for looking up in the log file.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-170.png

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-171.png

Add the metric failure conditions to be applied to your selected objects. To add more conditions press the green “+” button.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-172.png

Click OK when finished configuring the threshold.

See Thresholds and Setting up Alerting for Multi-value Monitors in Alerts 2.0 for more info.

  • Click Don’t Send Alerts if you don’t want any alerts for this monitor to be sent.

Your newly created Log monitor will appear in your Monitis dashboard. Wait until it loads the first data.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-173.png

 

Viewing Log Monitor

The Log monitor is a multi-value monitor, so every check will return the number of processed lines and match count for every regex pattern to look up that you have specified.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-174.png

You can also choose the way your data is plotted on the chart: to show either metrics for the selected object, or the selected metric for the objects.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-175.png

On the below screen object data is shown for the selected metric.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-176.png

And here metric data is shown for the selected object.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-177.png

You can toggle off/on metrics on the horizontal axis.

 

Using Monitor Settings

You can use the Settings window to change Log monitor setup data at any time: e.g. change the log file path or lookup regex patterns and run a test again.

https://www.monitis.com/support/wp-content/uploads/2016/08/word-image-178.png