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: Scripts applicable for partners and clients. 
    • Script Name: Unique name provided for the script.
    • Description: Detailed description that explains the reason for the script.
    • Execution Type: Select the type of execution. Depending on the selected type of execution, the screen displays more fields. For example, if you select EXE as execution type, 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: 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

Set 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:

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.

Manage 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.

View 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

Create 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: Template type.
    • Collector Type: Select Agent.
    • Monitor Type: Select G1 Monitors.
    • Applicable for: Select Device.
    • Template Name: Name of the template.
    • Description: Summary of the template.
    • Generation: Generation that the template belongs to.
    • Tags: User-defined tags for better filtering.
    • Prerequisites: Essential things that you must consider while monitoring using the template.
    • Status: Active or End-of-life templates.
    • Notes: Information that you want to add to the template.
    • Template Family Name: Category that applies to the application. For example, Windows Server, Storage Server, and Network Server.
    • Deployment Type: 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.
        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: 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.

Next steps