Difference between revisions of "Template: ArticlePEServiceMetrics"

From Genesys Documentation
Jump to: navigation, search
(Porting over changes from all.docs-content (removing dupe "No alerts defined"; adding MoreMetrics info, a switch to suppress the Metrics table, and CRDs handling))
(updating to fix service name display)
 
Line 7: Line 7:
 
|CRD=
 
|CRD=
 
|Annotations=
 
|Annotations=
|NoCRDsOrAnnotations
 
 
|Port=
 
|Port=
 
|Endpoint=
 
|Endpoint=
 
|MetricsIntro=
 
|MetricsIntro=
 
|MetricsUpdateInterval=
 
|MetricsUpdateInterval=
|MoreMetricsInfo=
 
 
}}
 
}}
 
</pre>
 
</pre>
Line 18: Line 16:
 
{{#cargo_declare:_table=ArticlePEServiceMetrics
 
{{#cargo_declare:_table=ArticlePEServiceMetrics
 
|IncludedServiceId=String
 
|IncludedServiceId=String
|CRD=Wikitext
+
|CRD=String
 
|Annotations=Wikitext
 
|Annotations=Wikitext
|NoCRDsOrAnnotations=Wikitext
 
 
|Port=Wikitext
 
|Port=Wikitext
 
|Endpoint=Wikitext
 
|Endpoint=Wikitext
|MetricsUpdateInterval=Wikitext
+
|MetricsUpdateInterval=String
 
|MetricsIntro=Wikitext
 
|MetricsIntro=Wikitext
 
|AlertsIntro=Wikitext
 
|AlertsIntro=Wikitext
 
}}
 
}}
{{#cargo_attach:_table=PEMonitoring}}
+
{{#cargo_attach:_table=PEMonitoring}}{{#cargo_attach:_table=Article}}
</noinclude><includeonly>[[Category:ArticlePEServiceMetrics]]
+
</noinclude><includeonly><!--
{{#cargo_store:_table=PEMonitoring
+
 
|IncludedServiceId={{{IncludedServiceId|}}}
+
adding category for format and TOC
|CRD={{{CRD|}}}
+
 
|Annotations={{{Annotations|}}}
+
-->[[Category:ArticlePEServiceMetrics]]
|Port={{{Port|}}}
+
__TOC__<!--
|Endpoint={{{Endpoint|}}}
+
 
|MetricsUpdateInterval={{{MetricsUpdateInterval|}}} }}
+
storing in PEMonitoring tables
{{#cargo_store:_table=ArticlePEServiceMetrics|IncludedServiceId={{{IncludedServiceId|}}}
+
-->
|CRD={{#if:{{{NoCRDsOrAnnotations|}}}|n/a|{{{CRD|}}}}}
+
{{#cargo_store:
|Annotations={{{Annotations|}}}
+
_table=PEMonitoring
|NoCRDsOrAnnotations={{{NoCRDsOrAnnotations|}}}
+
|IncludedServiceId={{{IncludedServiceId|}}}
|Port={{#if:{{{NoCRDsOrAnnotations|}}}|n/a|{{{Port|}}}}}
+
|CRD={{{CRD|}}}
|Endpoint={{#if:{{{NoCRDsOrAnnotations|}}}|n/a|{{{Endpoint|}}}}}
+
|Annotations={{{Annotations|}}}
|MetricsIntro={{{MetricsIntro|}}}
+
|Port={{{Port|}}}
|AlertsIntro={{{AlertsIntro|}}}
+
|Endpoint={{{Endpoint|}}}
|MetricsUpdateInterval={{#if:{{{NoCRDsOrAnnotations|}}}|n/a|{{{MetricsUpdateInterval|}}}}} }}<!-- Set MintyDocs topic, including a switch for different treatment for Manual pages -->{{#mintydocs_topic:
+
|MetricsUpdateInterval={{{MetricsUpdateInterval|}}}  
|display name={{#if:{{{AltServiceDisplayName|}}}|{{{AltServiceDisplayName}}}|{{#cargo_query:tables=IncludedService,ArticlePEServiceMetrics|join on=IncludedService.Id=ArticlePEServiceMetrics.IncludedServiceId|fields=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)|no html|where=ArticlePEServiceMetrics._pageName="{{FULLPAGENAME}}"|group by=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)}}}} metrics and alerts
+
}}<!--
|toc name={{#if:{{{AltServiceDisplayName|}}}|{{#cargo_query:tables=IncludedService,ArticlePEServiceMetrics|join on=IncludedService.Id=ArticlePEServiceMetrics.IncludedServiceId|fields=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)|no html|where=ArticlePEServiceMetrics._pageName="{{FULLPAGENAME}}"|group by=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)}} metrics and alerts|}}
+
 
}}<!-- Defining the EPPO Header; all parameters need to be passed to it -->{{EPPOHead|Context=Find the metrics {{#cargo_query:tables=IncludedService,ArticlePEServiceMetrics|join on=IncludedService.Id=ArticlePEServiceMetrics.IncludedServiceId|fields=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)|where=ArticlePEServiceMetrics._pageName="{{FULLPAGENAME}}"|group by=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)}} exposes and the alerts defined for {{#cargo_query:tables=IncludedService,ArticlePEServiceMetrics|join on=IncludedService.Id=ArticlePEServiceMetrics.IncludedServiceId|fields=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)|where=ArticlePEServiceMetrics._pageName="{{FULLPAGENAME}}"|group by=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)}}.|PageType=Article}}__TOC__
+
storing in ArticlePEServiceMetrics tables
 +
-->{{#cargo_store:
 +
_table=ArticlePEServiceMetrics
 +
|IncludedServiceId={{{IncludedServiceId|}}}
 +
|CRD={{{CRD|}}}
 +
|Annotations={{{Annotations|}}}
 +
|Port={{{Port|}}}
 +
|Endpoint={{{Endpoint|}}}
 +
|MetricsIntro={{{MetricsIntro|}}}
 +
|AlertsIntro={{{AlertsIntro|}}}
 +
|MetricsUpdateInterval={{{MetricsUpdateInterval|}}}  
 +
}}<!--
 +
 
 +
storing values in Article table for general queries
 +
 
 +
-->{{#cargo_store:
 +
_table=Article
 +
|productshort={{#explode:{{FULLPAGENAME}}|/|0}}
 +
|Product={{MINTYDOCSPRODUCT}}
 +
|Manual={{#explode:{{FULLPAGENAME}}|/|2}}
 +
|PEPageType={{{PEPageType|}}}
 +
}}<!--  
 +
 
 +
Set MintyDocs topic, including a switch for different treatment for Manual pages  
 +
 
 +
-->{{#mintydocs_topic:
 +
|display name=
 +
{{#if:{{{AltServiceDisplayName|}}}
 +
|{{{AltServiceDisplayName}}}
 +
|{{#cargo_query:
 +
tables=
 +
IncludedService,
 +
ArticlePEServiceMetrics
 +
|join on=IncludedService.Id=ArticlePEServiceMetrics.IncludedServiceId
 +
|fields=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)
 +
|no html
 +
|where=ArticlePEServiceMetrics._pageName="{{FULLPAGENAME}}"
 +
|group by=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)
 +
|default={{#cargo_query:
 +
tables=
 +
Article,MintyDocsManual,Service
 +
|join on=
 +
Article.Manual=MintyDocsManual.Manual,
 +
MintyDocsManual.ServiceId=Service.Id
 +
|fields=IF(ShortName IS NULL,Service.Name,ShortName)
 +
|group by=Service.Name
 +
|where=Article._pageName="{{FULLPAGENAME}}"
 +
|no html
 +
}}
 +
}}
 +
}} metrics and alerts
 +
|toc name={{#cargo_query:
 +
tables=
 +
IncludedService,
 +
ArticlePEServiceMetrics
 +
|join on=IncludedService.Id=ArticlePEServiceMetrics.IncludedServiceId
 +
|fields=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)
 +
|no html
 +
|where=ArticlePEServiceMetrics._pageName="{{FULLPAGENAME}}"
 +
|group by=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)
 +
|default={{#cargo_query:
 +
tables=
 +
Article,MintyDocsManual,Service
 +
|join on=
 +
Article.Manual=MintyDocsManual.Manual,
 +
MintyDocsManual.ServiceId=Service.Id
 +
|fields=IF(ShortName IS NULL,Service.Name,ShortName)
 +
|group by=Service.Name
 +
|where=Article._pageName="{{FULLPAGENAME}}"
 +
|no html
 +
}}
 +
}} metrics and alerts
 +
}}<!--  
 +
 
 +
Defining the EPPO Header; all parameters need to be passed to it  
 +
-->{{EPPOHead
 +
|Context=Find the metrics {{#cargo_query:
 +
tables=
 +
IncludedService,
 +
ArticlePEServiceMetrics
 +
|join on=IncludedService.Id=ArticlePEServiceMetrics.IncludedServiceId
 +
|fields=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)
 +
|where=ArticlePEServiceMetrics._pageName="{{FULLPAGENAME}}"
 +
|group by=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)
 +
|default={{#cargo_query:
 +
tables=
 +
Article,MintyDocsManual,Service
 +
|join on=
 +
Article.Manual=MintyDocsManual.Manual,
 +
MintyDocsManual.ServiceId=Service.Id
 +
|fields=IF(ShortName IS NULL,Service.Name,ShortName)
 +
|group by=Service.Name
 +
|where=Article._pageName="{{FULLPAGENAME}}"
 +
|no html
 +
}}
 +
}} exposes and the alerts defined for {{#cargo_query:
 +
tables=IncludedService,ArticlePEServiceMetrics
 +
|join on=IncludedService.Id=ArticlePEServiceMetrics.IncludedServiceId
 +
|fields=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)
 +
|where=ArticlePEServiceMetrics._pageName="{{FULLPAGENAME}}"
 +
|group by=IF(IncludedService.ShortName IS NOT NULL,IncludedService.ShortName,IncludedService.Name)
 +
|default={{#cargo_query:
 +
tables=
 +
Article,MintyDocsManual,Service
 +
|join on=
 +
Article.Manual=MintyDocsManual.Manual,
 +
MintyDocsManual.ServiceId=Service.Id
 +
|fields=IF(ShortName IS NULL,Service.Name,ShortName)
 +
|group by=Service.Name
 +
|where=Article._pageName="{{FULLPAGENAME}}"
 +
|no html
 +
}}
 +
}}.
 +
|PageType=Article
 +
}}<!--
 +
 
 +
formatting table
 +
 
 +
-->
 
{{{!}}
 
{{{!}}
 
! '''Service'''
 
! '''Service'''
Line 55: Line 170:
 
!'''Metrics update interval'''
 
!'''Metrics update interval'''
 
{{!}}-
 
{{!}}-
{{!}} {{#if:{{{NoCRDsOrAnnotations|}}}|rowspan="2"{{!}}|}}{{#if:{{{AltServiceDisplayName|}}}|{{{AltServiceDisplayName}}}|{{#cargo_query:tables=IncludedService|fields=IF(ShortName IS NOT NULL,ShortName,Name)|where=Id="{{{IncludedServiceId}}}"}}}}
+
{{!}} {{#if:{{{NoCRDsOrAnnotations|}}}
{{!}} {{#if:{{{NoCRDsOrAnnotations|}}}|n/a
+
|rowspan="2"{{!}}
{{!}} n/a
+
|
{{!}} n/a
+
}}{{#if:{{{AltServiceDisplayName|}}}
{{!}} n/a
+
|{{{AltServiceDisplayName}}}
{{!}}-
+
|{{#cargo_query:
{{!}} colspan="4"{{!}}{{{NoCRDsOrAnnotations}}}|{{{CRD|}}}{{{Annotations|}}}
+
tables=IncludedService
 +
|fields=IF(ShortName IS NOT NULL,ShortName,Name)
 +
|where=Id="{{{IncludedServiceId}}}"
 +
|default={{#cargo_query:
 +
tables=
 +
Article,MintyDocsManual,Service
 +
|join on=
 +
Article.Manual=MintyDocsManual.Manual,
 +
MintyDocsManual.ServiceId=Service.Id
 +
|fields=IF(ShortName IS NULL,Service.Name,ShortName)
 +
|group by=Service.Name
 +
|where=Article._pageName="{{FULLPAGENAME}}"
 +
|no html
 +
}}
 +
}}
 +
}}
 +
{{!}}{{{CRD|}}}{{{Annotations|}}}
 
{{!}}{{{Port|}}}
 
{{!}}{{{Port|}}}
 
{{!}}{{{Endpoint|}}}
 
{{!}}{{{Endpoint|}}}
{{!}}{{{MetricsUpdateInterval|}}}}}
+
{{!}}{{{MetricsUpdateInterval|}}}{{#if:{{{NoCRDsOrAnnotations|}}}|<br/>
 +
{{!}}-
 +
{{!}} colspan="4"{{!}}{{{NoCRDsOrAnnotations}}}|}}
 
{{!}}}
 
{{!}}}
 
{{#switch:{{{AlertsDefined}}}|No=|Yes|#default=
 
{{#switch:{{{AlertsDefined}}}|No=|Yes|#default=
Line 72: Line 205:
 
{{AnchorDiv|Metrics}}
 
{{AnchorDiv|Metrics}}
 
==Metrics==
 
==Metrics==
{{{MetricsIntro|}}}{{#switch:{{{MetricsDefined}}}|No=|Yes|#default=
+
{{{MetricsIntro|}}}
 
{{{!}} class="sortable"
 
{{{!}} class="sortable"
 
! '''Metric and description'''
 
! '''Metric and description'''
Line 80: Line 213:
 
{{{PEMetric|}}}
 
{{{PEMetric|}}}
 
{{!}}}
 
{{!}}}
}}
 
{{#if:{{{MoreMetricsInfo|}}}|{{{MoreMetricsInfo}}}|}}
 
  
 
{{AnchorDiv|Alerts}}
 
{{AnchorDiv|Alerts}}
 
==Alerts==
 
==Alerts==
{{#switch:{{{AlertsDefined}}}|No=No alerts are defined for {{#sub:{{MINTYDOCSDISPLAYNAME}}|0|-19}}.|Yes|#default={{#if:{{{AlertsIntro|}}}|{{{AlertsIntro}}}|}}
+
{{#switch:{{{AlertsDefined}}}|No=No alerts are defined for {{#sub:{{MINTYDOCSMANUAL}}|0|-22}}.|Yes|#default={{#if:{{{AlertsIntro|}}}|{{{AlertsIntro}}}|}}
  
 
{{#if:{{{PEAlert|}}}|The following alerts are defined for {{#sub:{{MINTYDOCSDISPLAYNAME}}|0|-19}}.
 
{{#if:{{{PEAlert|}}}|The following alerts are defined for {{#sub:{{MINTYDOCSDISPLAYNAME}}|0|-19}}.
Line 96: Line 227:
 
{{{PEAlert|}}}
 
{{{PEAlert|}}}
 
{{!}}}
 
{{!}}}
|}}}}[[Category:Linkable]]</includeonly><noinclude>[[Category:PrivateEdition]]</noinclude>
+
|No alerts are defined for {{#sub:{{MINTYDOCSDISPLAYNAME}}|0|-19}}.}}}}[[Category:Linkable]]</includeonly><noinclude>[[Category:PrivateEdition]]</noinclude>

Latest revision as of 13:54, September 9, 2022

This is the "ArticlePEServiceMetrics" template. It should be called in the following format:

{{ArticlePEServiceMetrics
|IncludedServiceId=
|CRD=
|Annotations=
|Port=
|Endpoint=
|MetricsIntro=
|MetricsUpdateInterval=
}}

Edit the page to see the template text. This template defines the table "ArticlePEServiceMetrics". View table. This template adds rows to the table "PEMonitoring", which is declared by the template PEMonitoring. View table.This template adds rows to the table "Article", which is declared by the template Article. View table.

Retrieved from "https://all.docs.genesys.com/Template:ArticlePEServiceMetrics (2024-07-27 22:36:46)"