Skip to content

Commit

Permalink
rabbitmq: remove deprecated healthcheck (#7823) (#7920)
Browse files Browse the repository at this point in the history
  • Loading branch information
pabigot authored Aug 10, 2020
1 parent 211c236 commit 2427142
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion plugins/inputs/rabbitmq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ For additional details reference the [RabbitMQ Management HTTP Stats][management
- sockets_used (int, sockets)
- running (int, node up)
- uptime (int, milliseconds)
- health_check_status (int, 1 or 0)
- mnesia_disk_tx_count (int, number of disk transaction)
- mnesia_ram_tx_count (int, number of ram transaction)
- mnesia_disk_tx_count_rate (float, number of disk transaction per second)
Expand Down
13 changes: 0 additions & 13 deletions plugins/inputs/rabbitmq/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,19 +508,6 @@ func gatherNodes(r *RabbitMQ, acc telegraf.Accumulator) {
"running": boolToInt(node.Running),
}

var health HealthCheck
err := r.requestJSON("/api/healthchecks/node/"+node.Name, &health)
if err != nil {
acc.AddError(err)
return
}

if health.Status == "ok" {
fields["health_check_status"] = int64(1)
} else {
fields["health_check_status"] = int64(0)
}

var memory MemoryResponse
err = r.requestJSON("/api/nodes/"+node.Name+"/memory", &memory)
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions plugins/inputs/rabbitmq/rabbitmq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ func TestRabbitMQGeneratesMetrics(t *testing.T) {
jsonFilePath = "testdata/queues.json"
case "/api/exchanges":
jsonFilePath = "testdata/exchanges.json"
case "/api/healthchecks/node/rabbit@vagrant-ubuntu-trusty-64":
jsonFilePath = "testdata/healthchecks.json"
case "/api/federation-links":
jsonFilePath = "testdata/federation-links.json"
case "/api/nodes/rabbit@vagrant-ubuntu-trusty-64/memory":
Expand Down Expand Up @@ -119,7 +117,6 @@ func TestRabbitMQGeneratesMetrics(t *testing.T) {
"sockets_used": 45,
"uptime": 7464827,
"running": 1,
"health_check_status": 1,
"mnesia_disk_tx_count": 16,
"mnesia_ram_tx_count": 296,
"mnesia_disk_tx_count_rate": 1.1,
Expand Down
1 change: 0 additions & 1 deletion plugins/inputs/rabbitmq/testdata/healthchecks.json

This file was deleted.

0 comments on commit 2427142

Please sign in to comment.