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.
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.
- Log in to the OpsRamp platform.
- Navigate to the Gateway Management section.
- Click the Browser Console option.
- Enter the required details on the Launch Browser Console dialog box. 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.
Connect to the GCLI Terminal
- Login to the Gateway.
- Type
gcli
and press enter.Thegcli
terminal opens.
Access SDK App 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:
- Access the gateway. If you haven’t already, refer to the Accessing the Gateway section for instructions.
- After logging in, switch to the sudo user with the following command:
sudo su
- 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.
- Access the gateway. If you haven’t already, refer to the Accessing the Gateway section for instructions.
- Use the following command to connect to the vprobe pod:
sudo kubectl exec -it nextgen-gw-0 -c vprobe -- /bin/bash
- To check the logs, use the tail command:
tail -1000f /var/log/app/vprobe.log
Enable debugging for specific class
Access the GCLI terminal
For instructions, refer to the section on connecting to the GCLI terminal. 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
For Example: loglevel set com.opsramp.nvidiabrightclustermanager.gateway.app.domain.TargetMonitoringUtil DEBUG 120.
Check Gateway connectivity and status
- Go to Setup → Resources → Management Profiles and check whether the status of the Management Profile is connected.
Check vprobe service status
Classic Gateway
- Login to the gateway. Refer How to access gateway.
- Execute the following command to check vprobe status.
service vprobe status
NextGen Gateway
- Login to the gateway.
- Login to sudo user using command
sudo su
- Execute
kubectl get pods
Prepare SDK app debug command request body
- 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"
}
}
- Update the required details in the debug request body with actual target device like ipAddressOrHostName, username, password , port.
- Convert the the debug request body to Base64 encode string by using the following URL:
- Use base64 encode string to execute the SDK app debug command as follows:
gcli > sdkappdebug <base64EncodeString>
Example:gcli > sdkappdebug ewoJImFwaVZlcnNpb24iOiAiZGVidWcvdjEiLAoJIm1vZHVsZSI6ICJEZWJ1ZyIsCgkiYXBwIjogIm52aWRpYS1icmlnaHQtY2x1c3Rlci1tYW5hZ2VyIiwKCSJhY3Rpb24iOiAiUm