The gateway acts as the central point for managing communication between OpsRamp and the resources being monitored. Logs generated by the apps running on the gateway are essential for diagnosing and resolving issues with monitoring, discovery, and integration processes.

The following processes constitute a foundation of the debugging workflow, ensuring that problems can be identified and resolved efficiently within the OpsRamp monitoring environment:

  • Access the OpsRamp Gateway: This allows administrators to run necessary commands, monitor the health of the environment, and collect relevant logs for troubleshooting.
  • Connect to the GCLI Terminal: This enables deeper interaction with the gateway, allowing the execution of debug commands and the analysis of logs in real-time.
  • View Logs: Reviewing these logs allows for tracking the app performance and debugging specific issues, such as failures in metric collection or resource discovery.

1. Access the OpsRamp Gateway

There are two primary methods to access the OpsRamp gateway:

Access the Gateway via SSH

Enter the following command in Git Bash to access the Gateway via SSH:
ssh username@gateway-ip Here:

  • Replace username with your actual username.
  • Replace gateway-ip with the IP address of the gateway.

Access the Gateway via browser console

You can access the gateway through a browser console, providing a web-based interface for management and debugging.
  1. Log in to the OpsRamp platform.
  2. Navigate to the Gateway Management section.
  3. Click the Browser Console option.
  4. Enter the required details on the Launch Browser Console dialog box.
  5. The browser will launch the console, redirecting you to the gateway interface.
This method is useful when a command-line interface is not available, or a web-based approach is preferred for monitoring and troubleshooting the gateway.

2. Connect to the GCLI Terminal

1. Login to the Gateway. 
2. Type `gcli` and press enter.The `gcli` terminal opens.

3. Access Logs

Logs generated by the are crucial for debugging and resolving issues related to monitoring integrations. Depending on whether you are using a Classic Gateway or a NextGen Gateway, the procedure to access these logs differ.

Classic Gateway

Follow these steps to access the SDK app logs in a Classic Gateway:

1. Access the gateway. If you haven't already, refer to the [Accessing the Gateway](/integrations/integrations-management/monitoring-integrations-2.0/debug-troubleshoot/gateway-access-logs/#1-access-the-opsramp-gateway) section for instructions.
2. After logging in, switch to the sudo user with the following command:
`sudo su`
3. To check the logs, use the tail command:
`tail -1000f /var/log/app/vprobe.log`

NextGen Gateway

For NextGen Gateway, the process involves accessing the vprobe pod before retrieving the logs.

  1. Access the gateway. If you haven’t already, refer to the Accessing the Gateway section for instructions.
  2. Use the following command to connect to the vprobe pod: sudo kubectl exec -it nextgen-gw-0 -c vprobe -- /bin/bash
  3. To check the logs, use the tail command: tail -1000f /var/log/app/vprobe.log

Enable debugging for specific class

  1. Access the GCLI terminal. For instructions, refer to the section on connecting to the GCLI terminal.
  2. Execute the following command to set the log level to DEBUG for a specific class, where TimeInSeconds defines how long the log level will remain active: loglevel set packagename.classname DEBUG TimeInSeconds

Example: loglevel set com.opsramp.nvidiabrightclustermanager.gateway.app.domain.TargetMonitoringUtil DEBUG 120.

Check Gateway connectivity & status

  1. Go to SetupResourcesManagement Profiles and check whether the status of the Management Profile is connected.
  2. Check vprobe service status

Classic Gateway

1. Login to the gateway. Refer How to access gateway.

2. Execute the following command to check vprobe status.
    `service vprobe status`

NextGen Gateway

1. Login to the gateway.

2. Login to sudo user using command `sudo su`

3. Execute `kubectl get pods`

Prepare the SDK app debug command request body

1. Get the corresponding debug request body from the specific app document

    For example, following is the sample debug request formats

REST API Example


{
    "apiVersion": "debug/v1",
    "module": "Device",
    "app": "veeam",
    "action": "Reachability",
    "payload": {
        "ipAddressOrHostName": "172.25.252.194",
        "protocol": "http",
        "port": "9988",
        "userName": "satya",
        "password": "c2F0eWE=",
        "requestPath": "/api/sessionMngr/?v=latest",
        "requestMethod": "POST"
    }
}

SSH Example


{
    "apiVersion": "debug/v1",
    "module": "Debug",
    "app": "nvidia-bright-cluster-manager",
    "action": "Reachability",
    "payload": {
        "ipAddressOrHostName": "172.25.252.193",
        "userName": "gateway-admin",
        "password": "<password>",
        "protocol": "ssh",
        "port": 22,
        "sshCommand": "hostname"
    }
}

2. Update the required details in the debug request body with actual target device like ipAddressOrHostName, username, password , port.
3. Convert the the debug request body to Base64 encode string by using [the following URL:](https://www.base64encode.org/)
4. Use base64 encode string to execute the SDK app debug command as follows:
    `gcli > sdkappdebug <base64EncodeString>`
Example: `gcli > sdkappdebug ewoJImFwaVZlcnNpb24iOiAiZGVidWcvdjEiLAoJIm1vZHVsZSI6ICJEZWJ1ZyIsCgkiYXBwIjogIm52aWRpYS1icmlnaHQtY2x1c3Rlci1tYW5hZ2VyIiwKCSJhY3Rpb24iOiAiUm`