- Products
- Learn
- Local User Groups
- Partners
- More
Simplify Admin Operations with R82.20
Wed, 19 August @ 5pm CET/11am EDT
The industry's first AI Network Firewall
Securing AI traffic, everywhere
The State of Ransomware Q2 2026:
This Quarter's Trends, and Their Impact on Your Defenses
READY OR NOT: Securing the AI Enterprise
AI Research & Threat Landscape
CheckMates Go:
No Attack Required
Hi CheckMates,
This one-liner script converts the output of cpview -m (monitoring metrics) into standardized Prometheus format.
Use Case: When integrating Skyline with SIEM systems like Prometheus, troubleshooting may require comparing the data that Skyline receives from cpview with what's actually queryable in Prometheus using PromQL. This script transforms the cpview JSON output into Prometheus metrics with labels and values.
How it works:
metric_name{label1="value1",label2="value2"} valueUsage:
cpview -m | jq -r '.metrics[] | .["metric-id"] as $metric | ($metric | split(".") | join("_")) as $metric_name | if (.data | length) > 0 then .data[] | (to_entries | map(select(.key != "value")) | map("\(.key)=\"\(.value)\"") | join(",")) as $labels | if $labels != "" then "\($metric_name){\($labels)} \(.value)" else "\($metric_name) \(.value)" end else empty end'
Examples:
cpview -m | jq -r '.metrics[] | .["metric-id"] as $metric | ($metric | split(".") | join("_")) as $metric_name | if (.data | length) > 0 then .data[] | (to_entries | map(select(.key != "value")) | map("\(.key)=\"\(.value)\"") | join(",")) as $labels | if $labels != "" then "\($metric_name){\($labels)} \(.value)" else "\($metric_name) \(.value)" end else empty end' | grep system_cpu_count
system_cpu_count 42
cpview -m | jq -r '.metrics[] | .["metric-id"] as $metric | ($metric | split(".") | join("_")) as $metric_name | if (.data | length) > 0 then .data[] | (to_entries | map(select(.key != "value")) | map("\(.key)=\"\(.value)\"") | join(",")) as $labels | if $labels != "" then "\($metric_name){\($labels)} \(.value)" else "\($metric_name) \(.value)" end else empty end' | grep system_cpu_utilization
system_cpu_utilization{cpu="0",state="idle",type="OTHER"} 69
system_cpu_utilization{cpu="1",state="idle",type="OTHER"} 70
system_cpu_utilization{cpu="2",state="idle",type="OTHER"} 72
system_cpu_utilization{cpu="3",state="idle",type="OTHER"} 67
system_cpu_utilization{cpu="4",state="idle",type="OTHER"} 69
system_cpu_utilization{cpu="5",state="idle",type="OTHER"} 68
system_cpu_utilization{cpu="6",state="idle",type="OTHER"} 68
system_cpu_utilization{cpu="7",state="idle",type="OTHER"} 73
system_cpu_utilization{cpu="8",state="idle",type="OTHER"} 70
system_cpu_utilization{cpu="9",state="idle",type="OTHER"} 70
Hi CheckMates,
This one-liner script converts the output of cpview -m (monitoring metrics) into standardized Prometheus format.
Use Case: When integrating Skyline with SIEM systems like Prometheus, troubleshooting may require comparing the data that Skyline receives from cpview with what's actually queryable in Prometheus using PromQL. This script transforms the cpview JSON output into Prometheus metrics with labels and values.
How it works:
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY