public.vwrealtimemonitoroverview

public.vwrealtimemonitoroverview

Description

Table Definition
CREATE VIEW vwrealtimemonitoroverview AS (
 WITH service_rows AS (
         SELECT realtimeadaptermonitordata.keyid,
            realtimeadaptermonitordata.servicename,
            realtimeadaptermonitordata.status,
            realtimeadaptermonitordata.isrunning,
            realtimeadaptermonitordata.eventsprocessed,
            realtimeadaptermonitordata.errorcount,
            realtimeadaptermonitordata.activeconnections,
            realtimeadaptermonitordata.totalwebsockets,
            realtimeadaptermonitordata.activeconversations,
            realtimeadaptermonitordata.staleconversationcount,
            realtimeadaptermonitordata.oldeststaleconversationageseconds,
            realtimeadaptermonitordata.healthpercentage,
            realtimeadaptermonitordata.acwpendingcount,
            realtimeadaptermonitordata.staleacwcount,
            realtimeadaptermonitordata.lastactivityutc,
            realtimeadaptermonitordata.lastconversationnotificationutc,
            realtimeadaptermonitordata.lastconversationhealthcheckutc,
            realtimeadaptermonitordata.lastconversationverifiedactiveutc,
            realtimeadaptermonitordata.updated,
            realtimeadaptermonitordata.notes
           FROM realtimeadaptermonitordata
          WHERE ((realtimeadaptermonitordata.servicename IS NOT NULL) AND ((realtimeadaptermonitordata.keyid)::text = (realtimeadaptermonitordata.servicename)::text))
        ), health_rows AS (
         SELECT replace((realtimeadaptermonitordata.keyid)::text, 'RealtimeMonitorService:service:'::text, ''::text) AS servicename,
            realtimeadaptermonitordata.healthpercentage,
            realtimeadaptermonitordata.updated AS healthupdated,
            realtimeadaptermonitordata.notes AS healthnotes
           FROM realtimeadaptermonitordata
          WHERE ((realtimeadaptermonitordata.keyid)::text ~~ 'RealtimeMonitorService:service:%'::text)
        ), overview AS (
         SELECT sr.servicename,
            sr.status,
            sr.isrunning,
            COALESCE(hr.healthpercentage, sr.healthpercentage) AS healthpercentage,
            sr.eventsprocessed,
            sr.errorcount,
            sr.activeconnections,
            sr.totalwebsockets,
            sr.activeconversations,
            sr.staleconversationcount,
            sr.oldeststaleconversationageseconds,
            ((sr.oldeststaleconversationageseconds)::numeric / 60.0) AS oldeststaleconversationageminutes,
            sr.acwpendingcount,
            sr.staleacwcount,
            sr.lastactivityutc,
            sr.lastconversationnotificationutc,
            sr.lastconversationhealthcheckutc,
            sr.lastconversationverifiedactiveutc,
            sr.updated,
                CASE
                    WHEN (sr.updated IS NULL) THEN NULL::integer
                    ELSE GREATEST(0, (floor(EXTRACT(epoch FROM (timezone('utc'::text, now()) - sr.updated))))::integer)
                END AS monitorrowageseconds,
            hr.healthupdated,
                CASE
                    WHEN (hr.healthupdated IS NULL) THEN NULL::integer
                    ELSE GREATEST(0, (floor(EXTRACT(epoch FROM (timezone('utc'::text, now()) - hr.healthupdated))))::integer)
                END AS healthrowageseconds,
            sr.notes,
            hr.healthnotes
           FROM (service_rows sr
             LEFT JOIN health_rows hr ON ((hr.servicename = (sr.servicename)::text)))
        )
 SELECT overview.servicename,
        CASE
            WHEN ((overview.servicename)::text = 'RealtimeMonitorService'::text) THEN 'Overall Realtime Health'::character varying
            ELSE overview.servicename
        END AS displayname,
        CASE
            WHEN ((overview.servicename)::text = 'RealtimeMonitorService'::text) THEN 'Overall'::text
            ELSE 'Service'::text
        END AS healthscope,
    overview.status,
    overview.isrunning,
    overview.healthpercentage,
        CASE
            WHEN (overview.healthpercentage IS NULL) THEN 'Unknown'::text
            WHEN (overview.healthpercentage >= (90)::numeric) THEN 'Healthy'::text
            WHEN (overview.healthpercentage >= (75)::numeric) THEN 'Degraded'::text
            WHEN (overview.healthpercentage >= (60)::numeric) THEN 'Warning'::text
            ELSE 'Critical'::text
        END AS healthstatus,
    ((overview.healthpercentage IS NOT NULL) AND (overview.healthpercentage < (60)::numeric) AND ((COALESCE(overview.healthnotes, ''::character varying))::text !~~ '%restart_suppressed=true%'::text)) AS restartrecommended,
    ((COALESCE(overview.healthnotes, ''::character varying))::text ~~ '%restart_suppressed=true%'::text) AS restartsuppressed,
        CASE
            WHEN ((COALESCE(overview.healthnotes, ''::character varying))::text ~~ '%restart_suppression_reason=outside_business_hours%'::text) THEN 'outside_business_hours'::text
            ELSE NULL::text
        END AS restartpolicyreason,
    overview.eventsprocessed,
    overview.errorcount,
    overview.activeconnections,
    overview.totalwebsockets,
    overview.activeconversations,
    overview.staleconversationcount,
    overview.oldeststaleconversationageseconds,
    overview.oldeststaleconversationageminutes,
    overview.acwpendingcount,
    overview.staleacwcount,
    overview.lastactivityutc,
    overview.lastconversationnotificationutc,
    overview.lastconversationhealthcheckutc,
    overview.lastconversationverifiedactiveutc,
    overview.updated,
    overview.monitorrowageseconds,
    overview.healthupdated,
    overview.healthrowageseconds,
    overview.notes,
    overview.healthnotes
   FROM overview
)

Columns

Name Type Default Nullable Children Parents Comment
servicename varchar(100) true
displayname varchar true
healthscope text true
status varchar(50) true
isrunning boolean true
healthpercentage numeric(5,2) true
healthstatus text true
restartrecommended boolean true
restartsuppressed boolean true
restartpolicyreason text true
eventsprocessed bigint true
errorcount bigint true
activeconnections integer true
totalwebsockets integer true
activeconversations integer true
staleconversationcount integer true
oldeststaleconversationageseconds integer true
oldeststaleconversationageminutes numeric true
acwpendingcount integer true
staleacwcount integer true
lastactivityutc timestamp without time zone true
lastconversationnotificationutc timestamp without time zone true
lastconversationhealthcheckutc timestamp without time zone true
lastconversationverifiedactiveutc timestamp without time zone true
updated timestamp without time zone true
monitorrowageseconds integer true
healthupdated timestamp without time zone true
healthrowageseconds integer true
notes varchar(400) true
healthnotes varchar(400) true

Referenced Tables

Name Columns Comment Type
public.realtimeadaptermonitordata 20 BASE TABLE
timezone 0
health_rows 0
overview 0

    • Related Articles

    • README

      Logo Genesys Adapter Data Dictionary Tables Name Columns Comment Type public.tabledefinitions 5 Subscription Detailed Data BASE TABLE public.activeqmembersdata 9 Historical Active Membership of Queues BASE TABLE public.activitycodedetails 11 Activity ...
    • public.evalquestiondata

      Columns Name Type Default Nullable Children Parents Comment keyid varchar(50) false evaluationid varchar(50) false evaluationformid varchar(50) false questiongroupid varchar(50) true questionid varchar(50) true answerid varchar(50) true score ...
    • public.participantattributesdynamic

      Columns Name Type Default Nullable Children Parents Comment keyid varchar(50) false conversationid varchar(50) false conversationstartdate timestamp without time zone false conversationstartdateltc timestamp without time zone true conversationenddate ...
    • public.hoursblockdata

      Columns Name Type Default Nullable Children Parents Comment keyid varchar(200) false userid varchar(50) true startdate timestamp without time zone true startdateltc timestamp without time zone true enddate timestamp without time zone true enddateltc ...
    • public.userinteractionpresencedetaileddata

      Columns Name Type Default Nullable Children Parents Comment keyid varchar(255) false userid varchar(50) true starttime timestamp without time zone false starttimeltc timestamp without time zone true endtime timestamp without time zone true endtimeltc ...