Skip to content

Commit

Permalink
Merge pull request #1201 from mackerelio/php-fpm-slow-requests-diff
Browse files Browse the repository at this point in the history
[mackerel-plugin-php-fpm] add slow_requests_delta metrics because slow_requests is a counter
  • Loading branch information
Arthur1 authored Jul 1, 2024
2 parents f62ff80 + 71ad9c0 commit eb01bc8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mackerel-plugin-php-fpm/lib/php-fpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ func (p PhpFpmPlugin) GraphDefinition() map[string]mp.Graphs {
Label: p.LabelPrefix + " Slow Requests",
Unit: "integer",
Metrics: []mp.Metrics{
{Name: "slow_requests", Label: "Slow Requests", Diff: false, Type: "uint64"},
{Name: "slow_requests", Label: "Slow Requests Counter", Diff: false, Type: "uint64"},
{Name: "slow_requests_delta", Label: "Slow Requests Delta", Diff: true, Type: "uint64"},
},
},
}
Expand All @@ -205,6 +206,7 @@ func (p PhpFpmPlugin) FetchMetrics() (map[string]interface{}, error) {
"listen_queue_len": status.ListenQueueLen,
"max_listen_queue": status.MaxListenQueue,
"slow_requests": status.SlowRequests,
"slow_requests_delta": status.SlowRequests,
}, nil
}

Expand Down

0 comments on commit eb01bc8

Please sign in to comment.