Skip to content

Commit

Permalink
adjust mysql in netdata metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
satkunas committed Dec 12, 2024
1 parent 54e8856 commit 950531d
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 31 deletions.
27 changes: 27 additions & 0 deletions conf/stats.conf.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,33 @@ mysql_query=SELECT table_name, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE T
interval=60s
management=true

[metric 'innodb buffer pool pages']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.mysql.innodb_buffer_pool_pages
mysql_query=
mysql_query=SHOW GLOBAL STATUS WHERE VARIABLE_NAME IN ('Innodb_buffer_pool_pages_data', 'Innodb_buffer_pool_pages_dirty', 'Innodb_buffer_pool_pages_flushed', 'Innodb_buffer_pool_pages_free', 'Innodb_buffer_pool_pages_made_not_young', 'Innodb_buffer_pool_pages_made_young', 'Innodb_buffer_pool_pages_old', 'Innodb_buffer_pool_pages_total', 'Innodb_buffer_pool_pages_lru_flushed', 'Innodb_buffer_pool_pages_lru_freed');
interval=60s
management=true

[metric 'innodb buffer pool bytes']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.mysql.innodb_buffer_pool_bytes
mysql_query=
mysql_query=SHOW GLOBAL STATUS WHERE VARIABLE_NAME IN ('Innodb_buffer_pool_bytes_data', 'Innodb_buffer_pool_bytes_dirty');
interval=60s
management=true

[metric 'innodb buffer pool r/w']
type=mysql_query
statsd_type=gauge
statsd_ns=source.packetfence.mysql.innodb_buffer_pool_read_write
mysql_query=
mysql_query=SHOW GLOBAL STATUS WHERE VARIABLE_NAME IN ('Innodb_buffer_pool_read_ahead_rnd', 'Innodb_buffer_pool_read_ahead', 'Innodb_buffer_pool_read_ahead_evicted', 'Innodb_buffer_pool_read_requests', 'Innodb_buffer_pool_reads', 'Innodb_buffer_pool_write_requests');
interval=60s
management=true

[metric 'total number of RADIUS Accept requests per switch id']
type=mysql_query
statsd_type=gauge
Expand Down
51 changes: 49 additions & 2 deletions html/pfappserver/root/src/views/Status/monitoring/_config/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,60 @@ export default [
name: 'MySQL', // i18n defer
groups: [
{
name: 'Database', // i18n defer
name: 'MySQL', // i18n defer
items: [
{
title: 'Database queries', // i18n defer
metric: 'mysql_PacketFence_Database.queries',
library: libraries.DYGRAPH,
cols: 6
},
{
title: 'Database handlers', // i18n defer
metric: 'mysql_PacketFence_Database.handlers',
library: libraries.DYGRAPH,
cols: 6
},
{
title: 'Database threads', // i18n defer
metric: 'mysql_PacketFence_Database.threads',
library: libraries.DYGRAPH,
cols: 6
},
{
title: 'Database connections', // i18n defer
metric: 'mysql_PacketFence_Database.connections',
library: libraries.DYGRAPH,
cols: 6
},
{
title: 'Table Rows', // i18n defer
metric: 'packetfence.mysql.table_rows',
library: libraries.DYGRAPH,
cols: 8
cols: 12
}
]
},
{
name: 'InnoDB', // i18n defer
items: [
{
title: 'InnoDB Pages', // i18n defer
metric: 'packetfence.mysql.innodb_buffer_pool_pages',
library: libraries.DYGRAPH,
cols: 12
},
{
title: 'InnoDB Bytes', // i18n defer
metric: 'packetfence.mysql.innodb_buffer_pool_bytes',
library: libraries.DYGRAPH,
cols: 12
},
{
title: 'InnoDB R/W', // i18n defer
metric: 'packetfence.mysql.innodb_buffer_pool_read_write',
library: libraries.DYGRAPH,
cols: 12
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,35 +148,6 @@ export default [
cols: 4
}
]
},
{
name: 'Database', // i18n defer
items: [
{
title: 'Database queries', // i18n defer
metric: 'mysql_PacketFence_Database.queries',
library: libraries.DYGRAPH,
cols: 6
},
{
title: 'Database handlers', // i18n defer
metric: 'mysql_PacketFence_Database.handlers',
library: libraries.DYGRAPH,
cols: 6
},
{
title: 'Database threads', // i18n defer
metric: 'mysql_PacketFence_Database.threads',
library: libraries.DYGRAPH,
cols: 6
},
{
title: 'Database connections', // i18n defer
metric: 'mysql_PacketFence_Database.connections',
library: libraries.DYGRAPH,
cols: 6
}
]
}
]
}
Expand Down

0 comments on commit 950531d

Please sign in to comment.