Hands-on task
This task is step 2 of the course “Monitoring and metrics”
Uptime as a Metric
Write /usr/local/bin/uptimemetric that takes the uptime from /proc/uptime (the first number, in seconds) and prints the metric node_uptime_seconds <value>. Output goes to /root/uptime.prom.
What you'll practise:
- monitoring
- prometheus-metrics
- /proc/uptime
- field extraction
- awk/cut