Dashboard creation using Query

Hi Team,

We use filebeat, logstash, Elasticsearch and kibana for logs. And we have index patterns created and visualisations and then dashboards.

Now I got a requirement saying to display the replication status that is : Transport lag and Apply lag stats between DC Prod Database and DR Prod (Stand by) Database.

PFB queries to fetch log apply gap and transport/apply lag details -

select Name, value from v$dataguard_stats where name in ('transport lag','apply lag');
2.
select sysdate from dual;
select primary.thread#,
primary.maxsequence primaryseq,
standby.maxsequence standbyseq,
primary.maxsequence - standby.maxsequence gap
from ( select thread#, max(sequence#) maxsequence
from v$archived_log
where archived = 'YES'
and resetlogs_change# = ( select d.resetlogs_change# from v$database d )
group by thread# order by thread# ) primary,
( select thread#, max(sequence#) maxsequence
from v$archived_log
where applied = 'YES'
and resetlogs_change# = ( select d.resetlogs_change# from v$database d )
group by thread# order by thread# ) standby
where primary.thread# = standby.thread#;

Hi , Are we loading this query result in some index?

No actually these queries are taken from a dataguard DB table. As per my knowledge, we have to create a comf file and then store there.

But don't know how to proceed.

Try logstash JDBC filter to load these queries data into a index

Here in [type] what should be kept. What will be the if condition. Could you please tell.

if [type] == "link" {
elasticsearch{
hosts => "localhost:9200"
index => "dblink-%{+YYYY.MM.dd}"
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.