Add starttime to php-fpm metrics (#5997)
This commit is contained in:
parent
1dcfcdbad3
commit
31291f5590
|
@ -21,6 +21,7 @@ import (
|
|||
const (
|
||||
PF_POOL = "pool"
|
||||
PF_PROCESS_MANAGER = "process manager"
|
||||
PF_START_SINCE = "start since"
|
||||
PF_ACCEPTED_CONN = "accepted conn"
|
||||
PF_LISTEN_QUEUE = "listen queue"
|
||||
PF_MAX_LISTEN_QUEUE = "max listen queue"
|
||||
|
@ -242,7 +243,8 @@ func importMetric(r io.Reader, acc telegraf.Accumulator, addr string) (poolStat,
|
|||
|
||||
// Start to parse metric for current pool
|
||||
switch fieldName {
|
||||
case PF_ACCEPTED_CONN,
|
||||
case PF_START_SINCE,
|
||||
PF_ACCEPTED_CONN,
|
||||
PF_LISTEN_QUEUE,
|
||||
PF_MAX_LISTEN_QUEUE,
|
||||
PF_LISTEN_QUEUE_LEN,
|
||||
|
|
|
@ -44,6 +44,7 @@ func TestPhpFpmGeneratesMetrics_From_Http(t *testing.T) {
|
|||
}
|
||||
|
||||
fields := map[string]interface{}{
|
||||
"start_since": int64(1991),
|
||||
"accepted_conn": int64(3),
|
||||
"listen_queue": int64(1),
|
||||
"max_listen_queue": int64(0),
|
||||
|
@ -85,6 +86,7 @@ func TestPhpFpmGeneratesMetrics_From_Fcgi(t *testing.T) {
|
|||
}
|
||||
|
||||
fields := map[string]interface{}{
|
||||
"start_since": int64(1991),
|
||||
"accepted_conn": int64(3),
|
||||
"listen_queue": int64(1),
|
||||
"max_listen_queue": int64(0),
|
||||
|
@ -130,6 +132,7 @@ func TestPhpFpmGeneratesMetrics_From_Socket(t *testing.T) {
|
|||
}
|
||||
|
||||
fields := map[string]interface{}{
|
||||
"start_since": int64(1991),
|
||||
"accepted_conn": int64(3),
|
||||
"listen_queue": int64(1),
|
||||
"max_listen_queue": int64(0),
|
||||
|
@ -175,6 +178,7 @@ func TestPhpFpmGeneratesMetrics_From_Socket_Custom_Status_Path(t *testing.T) {
|
|||
}
|
||||
|
||||
fields := map[string]interface{}{
|
||||
"start_since": int64(1991),
|
||||
"accepted_conn": int64(3),
|
||||
"listen_queue": int64(1),
|
||||
"max_listen_queue": int64(0),
|
||||
|
|
Loading…
Reference in New Issue