Overview

Remote Commands in OpsRamp allow you to quickly retrieve key information about a resource — such as CPU usage, disk space, network details, and system status - directly from the OpsRamp portal, without needing to log in to the resource itself.

This is especially useful for IT administrators and operations teams who need to perform quick diagnostics, troubleshoot issues, or gather system information across multiple resources in real time.

What Can You Do with Remote Commands?

  • Monitor resource health - Check CPU, memory, and disk usage at a glance.
  • Troubleshoot connectivity - Run Ping, Trace Route, and NSLookup commands to diagnose network issues.
  • Inspect system details - View hostname, IP configuration, OS version, running processes, and services.
  • Manage agents - Restart agents, enable debug logging, and view recent agent logs.
  • Execute custom commands - Run your own commands on resources with appropriate permissions.
  • Manage gateway resources - Execute Kubernetes and gateway-specific commands on NextGen and Classic gateways.

Prerequisites

Before you can use Remote Commands, ensure the following requirements are met:

Required Packages and Add-ons

  • Users must have the Remediation and Automation package enabled.
  • Users must have the Remote Access Management Add-on activated.

Required Permissions

CategoryPermission TypePermissions
Account AdministrationDevicesView / Edit / Create / Manage
Remote AccessCommandsAllow to Run Commands

How to Execute a Remote Command

Follow these steps to run a remote command on one or more resources:

  1. Navigate to Infrastructure → Search in the OpsRamp portal.
  2. On the Infrastructure search page, search for the resource(s) using resource categories, resource groups, sites, or a custom query.
  3. Select the resource(s) using the checkboxes.
  4. Click the Actions menu and select Execute Command.
    patch management
  5. In the Execute Command popup:
    • Choose a command from the Command Name dropdown.
    • Click Execute Command to run it.
      patch management
  6. The command output appears in the results pane. Review the output for the diagnostic information you need.

Agent Remote Commands

System Information Commands

Remote Command NameDescriptionWindowsLinux
CPU and Memory UsageRetrieves the current CPU and memory utilization of the resource, helping you quickly identify whether a resource is under heavy load.
Disk UsageRetrieves disk space usage across all mounted drives or partitions, showing total, used, and available space.
HostnameReturns the hostname of the resource as configured on the operating system.
IPConfigRetrieves the IP address configuration of the resource, including assigned IP addresses, subnet masks, and default gateways.
System InfoReturns detailed system information including hostname, OS name, OS version, architecture, and other platform-level details.
System StatusProvides system status information such as hostname, OS name, OS version, and overall health indicators.
ProcessesLists all currently running processes along with basic details such as process ID, CPU usage, and memory consumption.
ServicesLists all installed services and their current status (running, stopped, etc.), helping you verify that critical services are operational.

Network Diagnostics Commands

Remote Command NameDescriptionWindowsLinux
PingTests network connectivity to a specified IP address or hostname by sending ICMP echo requests. Useful for verifying whether a target host is reachable.
Trace RouteDisplays the network path packets take to reach a specified destination, showing each hop and the transit delay at each point. Useful for identifying where network latency or packet loss occurs.
NSLookupQueries the Domain Name System (DNS) to obtain domain name-to-IP address mappings or other DNS records. Useful for diagnosing DNS resolution issues.

Agent Management Commands

Remote Command NameDescriptionWindowsLinux
Restart AgentRestarts the OpsRamp agent service on the resource. Use this when the agent becomes unresponsive or after configuration changes that require a service restart.
Restart Remote AgentRestarts the OpsRamp agent on a remote Windows resource. You must provide the remote RDP credentials when executing this command.
Enable Agent Log Debug ModeTemporarily enables debug-level logging on the agent. Select a duration from the dropdown (10, 30, or 60 minutes). Once the selected duration expires, the agent log level automatically reverts to WARNING.
Show Recent Agent LogRetrieves the most recent agent log entries. Select the number of lines to retrieve from the dropdown: 100, 200, or 500 lines.
Internal Agent CommandExecutes internal agent operations for advanced diagnostics. Available options: SYNC_MONIT_CONFIGS (synchronizes monitoring configurations) and POST_INVENTORY (posts the latest inventory data to OpsRamp).

Windows-Specific Commands

Remote Command NameDescription
Disable Windows Auto UpdateDisables the Windows automatic update service on the resource. Useful in environments where updates are managed through a centralized patch management process.
Critical and Error Event LogsRetrieves a list of Critical and Error-level events from the Windows Event Log for the specified time period. Helps identify recent system or application failures.
RDP and VNC OptionsChecks whether Remote Desktop Protocol (RDP) and Virtual Network Computing (VNC) are enabled on the resource. Useful for verifying remote access readiness before initiating a remote session.
Remote System InfoRetrieves system information from a remote Windows device, including hostname, OS name, OS version, and other configuration details.

Custom Command Execution

Remote Command NameDescriptionSupported OS
Execute a CommandAllows you to run a custom command on the resource. This option is available to Partner and Client users only. See the Restricted Commands section below for commands that are blocked due to security considerations.Windows, Linux

Restricted Commands for “Execute a Command”

When using the Execute a Command option, certain commands are restricted because they could cause system disruption, enable unauthorized access, or compromise security. OpsRamp blocks the following commands to protect your infrastructure.

Shells and Scripting

CommandWhy It's Restricted
bash, sh, pdksh, tcsh, [sabckz]shUnix shells that can execute arbitrary shell commands or scripts, potentially allowing full system access.
aliasCreates shortcuts for commands that can hide malicious behavior by masking the actual command being executed.
powershell, cscriptWindows scripting environments (PowerShell for automation and cscript for VBScript/JScript) that allow powerful and potentially dangerous system-level operations.
python, python3, py, perl, php, ruby, lua, go, gccProgramming language interpreters and compilers that could be used to execute malicious scripts or compile unauthorized code.

Networking and Remote Access

CommandWhy It's Restricted
nc, ncatNetcat tools used for reading and writing data over TCP/UDP connections. Commonly exploited for reverse shells and port scanning.
wget, curlDownload files from the internet and are often used to fetch and execute remote scripts or malicious executables.
scpSecurely copies files over SSH and could be used for unauthorized data exfiltration.
telnetLegacy remote access protocol that lacks encryption and poses significant security risks.
netstatDisplays active network connections and open ports, potentially revealing network topology information.
tracerouteTraces the network path to a destination, which can expose internal network architecture.

System and File Operations

CommandWhy It's Restricted
rm, del, delete, format, resetFile deletion, disk formatting, and system reset commands that are potentially destructive and irreversible.
reboot, logoff, shutdownSystem availability commands that can disrupt services and cause downtime.
mkdir, pwd, ls, chmod, chownFilesystem manipulation commands that can create directories, change file permissions, or alter file ownership.
apt installPackage installation command that could introduce malicious tools or unauthorized software.

Execution and Process Management

CommandWhy It's Restricted
killTerminates running processes and can be used maliciously to stop monitoring agents, security tools, or critical system services.
socatA bidirectional data relay commonly used in advanced reverse shell setups for unauthorized remote access.
doskey *=*Windows command aliasing tool that can mask malicious commands behind innocent-looking aliases.
crontab -rRemoves all scheduled cron jobs for a user, resulting in a disruptive and potentially destructive action.
systemctlControls systemd services on Linux and can start, stop, restart, or disable services, including security and monitoring tools.

Gateway Remote Commands

In addition to standard agent remote commands, OpsRamp supports a set of gateway-specific commands that can be executed through the agent installed on NextGen and Classic gateways. These commands are designed for gateway-level diagnostics, including Kubernetes pod management and gateway service monitoring.

Required Permissions

The following permissions are required to view and run the commands.

CategoryPermission TypePermissions
Account AdministrationDevicesManage
CollectorsManage Management ProfileManage
Remote AccessCommandsAllow To Run

NextGen Gateway Commands

These commands allow you to inspect and manage Kubernetes resources running on a NextGen gateway.

Remote CommandDescription
Kubectl Get PodsLists all Kubernetes pods running on the NextGen gateway, including their status, restart count, and age.
Kubectl Get ServicesLists all Kubernetes services on the NextGen gateway, showing service type, cluster IP, and exposed ports.
Kubectl Get PVCLists all Kubernetes Persistent Volume Claims (PVCs) on the NextGen gateway, showing storage capacity and binding status.
Kubectl Get NodesLists all Kubernetes nodes on the NextGen gateway, displaying node status, roles, and resource capacity.
Kubectl Top PodsDisplays real-time CPU and memory usage for each pod running on the NextGen gateway.
Kubectl Top Pods NextGen Gw ContainersDisplays real-time CPU and memory usage at the container level within NextGen gateway pods, providing more granular resource visibility.
Kubectl Describe Pod NextGen GwRuns kubectl describe on the NextGen gateway pod, providing detailed information including events, resource limits, and container status.
Kubectl Describe Pod NextGen Gw Redis MasterRuns kubectl describe on the Redis Master pod within the NextGen gateway, showing configuration and event history.
Kubectl Describe NodeRuns kubectl describe on the Kubernetes node hosting the NextGen gateway, showing node conditions, allocated resources, and running pods.
Kubectl Delete Pod NextGen GwDeletes a specified pod on the NextGen gateway. Kubernetes automatically reschedules a replacement pod. Use this command to recover from a stuck or failed pod.
Show Recent NextGen GW Vprobe and TLS LogsRetrieves the most recent vprobe and vprobe TLS logs from the NextGen gateway. Select the number of log lines to retrieve (for example, 100 lines returns the last 100 lines from both logs).

Classic Gateway Commands

These commands allow you to inspect and manage Kubernetes resources running on a classic gateway.

Remote CommandDescription
Monit SummaryDisplays the status of all Classic Gateway services monitored by Monit, including vprobe, web probe, Django, nginx, and other services. Use this command to quickly verify that all gateway components are running.
Show Recent Classic GW Vprobe LogsRetrieves the most recent vprobe logs from the Classic Gateway. Select the number of lines to display (for example, 100 lines returns the last 100 log entries).
Show Recent Classic GW VprobeTLS LogsRetrieves the most recent vprobe TLS logs from the Classic Gateway. Select the number of lines to display (for example, 100 lines returns the last 100 log entries).
OpensslExecutes openssl s_client to connect to a remote host using SSL/TLS. Useful for diagnosing SSL certificate issues, verifying TLS configurations, and testing secure connectivity from the gateway.
Vprobe RestartRestarts the Classic Gateway vprobe service (the core monitoring service). Use this command when vprobe becomes unresponsive or after configuration changes.