Skip to content

Commit

Permalink
Normalize fields to json
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelsaks committed Dec 10, 2024
1 parent 2222740 commit 79260f5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
10 changes: 5 additions & 5 deletions metricbeat/module/pgbouncer/lists/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
type: long
description: >
Count of pools.
- name: free_clients
- name: clients.free
type: long
description: >
Count of free clients. These are clients that are disconnected, but PgBouncer keeps the memory around that was allocated for them so it can be reused for future clients to avoid allocations.
- name: used_clients
- name: clients.used
type: long
description: >
Count of used clients.
- name: login_clients
- name: clients.login
type: long
description: >
Count of clients in login state.
- name: free_servers
- name: servers.free
type: long
description: >
Count of free servers. These are servers that are disconnected, but PgBouncer keeps the memory around that was allocated for them so it can be reused for future servers to avoid allocations.
- name: used_servers
- name: servers.used
type: long
description: >
Count of used servers.
Expand Down
29 changes: 17 additions & 12 deletions metricbeat/module/pgbouncer/lists/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,21 @@ import (
)

var schema = s.Schema{
"databases": c.Int("databases"),
"users": c.Int("users"),
"peers": c.Int("peers"),
"pools": c.Int("pools"),
"peer_pools": c.Int("peer_pools"),
"free_clients": c.Int("free_clients"),
"used_clients": c.Int("used_clients"),
"login_clients": c.Int("login_clients"),
"free_servers": c.Int("free_servers"),
"used_servers": c.Int("used_servers"),
"dns_names": c.Int("dns_names"),
"dns_zones": c.Int("dns_zones"),
"databases": c.Int("databases"),
"users": c.Int("users"),
"peers": c.Int("peers"),
"pools": c.Int("pools"),
"peer_pools": c.Int("peer_pools"),
"clients": s.Object{
"free": c.Int("free_clients"),
"used": c.Int("used_clients"),
"login": c.Int("login_clients"),
},
"servers": s.Object{
"free": c.Int("free_servers"),
"used": c.Int("used_servers"),
},
"dns_names": c.Int("dns_names"),
"dns_zones": c.Int("dns_zones"),
"dns_queries": c.Int("dns_queries"),
}

0 comments on commit 79260f5

Please sign in to comment.