Introduction

The Agent-based G1 custom monitor helps you to create your own script to create new monitors. To write a script, choose a supported scripting language supported. For example, Python, Windows PowerShell, and SHELL.

To create agent-based custom monitors:

  1. Go to Setup > Monitoring > Agent Custom Monitors.
  2. From AGENT CUSTOM MONITORS, click + Add.
  3. From CREATE MONITOR SCRIPT, provide details for the following parameters:
    • Select Script Type: Refers to the scripts applicable for partners and clients. 
    • Script Name: Refers to the unique name provided for the script.
    • Description: Refers to the detailed description that explains the reason for the script.
    • Execution Type: Refers to the type of execution. Select as desired.
      Depending on the selected type of execution, the screen displays more fields. For example, if you select EXE as execution type, then the File field appears below. You can use Choose File to upload the required .exe file. If you select any other execution type, you need to provide Command/File Name and the corresponding script extension.
    • Metrics: Refers to the Metrics required for the script.
      To add Metrics:
      1. From Metrics, click + Add Metric .
      2. Provide metric information.
  4. Click Save.
    AGENT CUSTOM MONITORS screen displays the new monitor.
Agent-based Create Custom Monitor

Agent-based Create Custom Monitor

After creating the Agent Custom Monitors, add the custom monitor to a template, and assign the template to a resource.

Agent-based custom monitor scripts

Use the following custom monitor scripts for G2 Agents:

  • VBS Script
  • PERL Script
  • PHP Script
  • PYTHON Script
  • BASH Script
  • POWERSHELL Script

Setting up folders and users

By default, all the custom monitor scripts and log files are downloaded to a predefined location in your system. The system user (Windows) and root user (Linux) holds all required permissions (Read, Write, and Execute) on the download folders.

The following table provides the default folder locations and users for Windows and Linux:

Default Folder Locations
Operating SystemDefault Folder LocationDefault User
Windows
  • 32 bit – %programfiles%\OpsRamp\Agent\utils
  • 64 bit – %programfiles(x86)%\OpsRamp\Agent\utils
System User
Linux/opt/opsramp/agent/lib/libexec/Root User
  • Default permission set for all executable files in this folder is 744.
  • Default permission set for other files in this folder is 644.

Managing agent custom monitors

You can manage the configured Agent custom monitors using multiple methods.

You can use the search option to find a custom monitor by the script name. For searching with criteria, use the Advanced option.

Advanced

To use the advanced search:

  1. Click Advanced.
  2. From ADVANCED SEARCH window, provide the following parameters:
    • Scope
    • Script Name
    • File Name
    • Description
  3. Click Search.

Viewing custom monitor script

After creating an agent custom monitor script, you can view the details such as metrics and templates from the VIEW CUSTOM MONITOR SCRIPT screen.

Agent-based View Custom Monitor

Agent-based View Custom Monitor

Creating a template using agent-based G1 custom monitor

You can add the Agent-based custom monitor to a template to initiate the monitoring of your resources.

To add agent-based G1 custom monitor to a template:

  1. Select a client from the All Clients list.
  2. Go to Setup > Monitoring > Templates.
  3. From the Templates screen, click + Add.
  4. From MONITOR TEMPLATE, provide details for the following parameters and click Save.
    • Select Template Scope: Refers to the template type.
    • Collector Type: Select Agent.
    • Monitor Type: Select G1 Monitors.
    • Applicable for: Select Device.
    • Template Name: Refers to the name of the template.
    • Description: Refers to the summary of the template.
    • Generation: Refers to the generation that the template belongs to.
    • Tags: Refers to the user-defined tags for better filtering.
    • Prerequisites: Refers to the essential things that you must consider while monitoring using the template.
    • Status: Refers to the Active or End-of-life templates.
    • Notes: Refers to the information that you want to add to the template.
    • Template Family Name: Refers to the category that applies to the application. For example, Windows Server, Storage Server, and Network Server.
    • Deployment Type: Refers to one of the following methods to apply the template to the resources:
      • Custom
      • Optional
      • Standard
        After providing the template details, MONITOR TEMPLATE displays the various available Monitors.
      • Go to Agent Custom Monitors.
        Note: The console for the Monitors section varies with the option selected in the Collector Type.
    • To add details in Agent Custom Monitors:
      1. From the Agent Custom Monitors section, click + Add.
      2. From Agent Custom Monitor, provide details for the following parameters:
        • Frequency: Refer to the frequency to execute the template.
        • Monitor: Refers to the available Agent custom monitors.
          After selecting the Monitor, you can provide the Params, Warning, and Critical threshold values.
        • Select Monitor, Availability, and Alert checkbox to initiate monitoring.

After adding the Agent custom monitor to a template, assign the template to a resource to initiate monitoring.

What to do next