ncabatoff / process-exporter

Prometheus exporter that mines /proc to report on selected processes
MIT License
1.67k stars 265 forks source link

Default value to -62135596800 corresponding to 0001-01-01 when no process found #286

Open maziadi opened 7 months ago

maziadi commented 7 months ago

Hi. I noticed that when no process $MY_PROCESS is running then the metric namedprocess_namegroup_oldest_start_time_seconds{groupname="$MY_PROCESS"} shows value -62135596800 corresponding to 0001-01-01.

Example:

curl -s 127.0.0.1:10081/metrics | grep -i "\-6.21355968e+10"
namedprocess_namegroup_oldest_start_time_seconds{groupname="http"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="https"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="identify"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="inkscape"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="joe"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="jpegtran"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="localedef"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="logger"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="logrotate"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="mv"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="ndtrack"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="osqueryi"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="perl"} -6.21355968e+10
namedprocess_namegroup_oldest_start_time_seconds{groupname="php"} -6.21355968e+10