I know there is a jdbc input plugin and I do know the SQL in reading the data as stated in the topic but I have no idea how to use logstash to map them. Is there anyone who know how to resolve?
I have created the file for reading CPU Utilization in SQL
CASE WHEN cpu_sql > cpu_total AND cpu_sql <= 99.
SELECT cpu_total = 100 - x.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle/text())', 'TINYINT')
SELECT TOP(1) [timestamp], x = CONVERT(XML, record)
WHERE ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR'
AND record LIKE '%%'
CROSS JOIN (
cpu_sql = (
MAX(CASE WHEN counter_name = 'CPU usage %' THEN t.cntr_value * 1. END) /
MAX(CASE WHEN counter_name = 'CPU usage % base' THEN t.cntr_value END)
) * 100
SELECT TOP(2) cntr_value, counter_name
WHERE counter_name IN ('CPU usage %', 'CPU usage % base')
AND instance_name = 'default'
But how can I map the result into logstash