p4_monitor_max_cmd_time currently reports the maximum elapsed time of any non-service-user command in the monitor table. This makes the metric unsuitable for alerting in environments where legitimate long-running admin commands (e.g., resource-monitor) are continuously active.
Monitor output:
$ p4 mon
110022 p4d/2025.1/LINUX26X86_64/2831954 background B remote unknown 744:20:30 admin resource-monitor
Promql query:
p4_monitor_max_cmd_time > 72000
p4_monitor_max_cmd_time{customer="customer",instance="customer-commit-useast1",job="remote_vmagent",sdpinst="1",serverid="master.customer.1"} 2680849