Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add New Metric Extensions for Alfresco Messaging #751

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<TargetCollectionExt EXT_NAME="ME$ALFRESCO_QUEUE_LAG" EXT_VERSION="1" TARGET_TYPE="host"><CollectionItem NAME="ME$ALFRESCO_QUEUE_LAG" UPLOAD="YES">
<Schedule>
<IntervalSchedule INTERVAL="15" TIME_UNIT="Min"/>
</Schedule>
<MetricColl NAME="ME$ALFRESCO_QUEUE_LAG">
<Condition COLUMN_NAME="QUEUE_LAG_MINS" CRITICAL="5" OPERATOR="GT" OCCURRENCES="1" MESSAGE="The Alfresco Queue Lag is %value% minutes." CLEAR_MESSAGE="The Alfresco Queue Lag is %value% minutes."/>
</MetricColl>
</CollectionItem>
</TargetCollectionExt>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<MetricExtensionArchive name="MEAME$ALFRESCO_QUEUE_LAG">
<MetricExtension name="ME$ALFRESCO_QUEUE_LAG" type="host" version="1" is_repos="FALSE" display_name="Alfresco Queue Lag" description="Maximum lag time in minutes that Alfresco messages have been queued." version_comment=" " metadata_digest="700b97eaa5bfd3d8d34101ca9acc6cbd" coll_digest="cc16bb83059a4ec23d7db92c5d9d3d36" attach_digest="512e2bf8ef982ed11ad02af109fa31a6">
<scripts name="alfresco_queue_lag.sh">
</scripts>
</MetricExtension>
</MetricExtensionArchive>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<TargetMetadataExt EXT_NAME="ME$ALFRESCO_QUEUE_LAG" EXT_VERSION="1" TARGET_TYPE="host"><Metric NAME="ME$ALFRESCO_QUEUE_LAG" TYPE="TABLE">
<Display>
<Label NLSID="NLS_METRIC_hostME$ALFRESCO_QUEUE_LAG">Alfresco Queue Lag</Label>
<Description NLSID="NLS_DESCRIPTION_hostME$ALFRESCO_QUEUE_LAG">Maximum lag time in minutes that Alfresco messages have been queued.</Description>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="QUEUE_LAG_MINS" TYPE="NUMBER">
<Display>
<Label NLSID="NLS_COLUMN_hostME$ALFRESCO_QUEUE_LAGQUEUE_LAG_MINS">Queue Lag Minutes</Label>
<Unit NLSID="EM_SYS_STANDARD_RATE_MINUTE">MINUTE</Unit>
<UnitCategory>RATE</UnitCategory>
</Display>
<CategoryValue CLASS="Default" CATEGORY_NAME="Capacity">
</CategoryValue>
</ColumnDescriptor>
</TableDescriptor>
<QueryDescriptor FETCHLET_ID="OSLineToken">
<Property NAME="command" SCOPE="GLOBAL">/bin/bash</Property>
<Property NAME="script" SCOPE="GLOBAL" OPTIONAL="TRUE">%scriptsDir%/alfresco_queue_lag.sh</Property>
<Property NAME="scriptLoc" SCOPE="GLOBAL" OPTIONAL="TRUE">%scriptsDir%</Property>
<Property NAME="delimiter" SCOPE="GLOBAL" OPTIONAL="TRUE">|</Property>
<Property NAME="ENVEM_TARGET_NAME" SCOPE="INSTANCE" OPTIONAL="TRUE">NAME</Property>
<CredentialRef NAME="OSCreds"></CredentialRef>
</QueryDescriptor>
</Metric>
</TargetMetadataExt>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
#
# Calculate the maximum number of minutes an alfresco
# message has been waiting to be processed.

. ~/.bash_profile

# Exit without failure if database is not up
srvctl status database -d $ORACLE_SID >/dev/null || exit 0

sqlplus -s / as sysdba <<EOSQL
SET ECHO OFF
SET FEEDBACK OFF
SET HEAD OFF
SET PAGES 0
SELECT ROUND(COALESCE(MAX(SYSDATE-date_created),0)*24*60,1) unprocessed_mins_ago
FROM delius_app_schema.spg_notification
WHERE processed_flag=4
;
EXIT
EOSQL
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<TargetCollectionExt EXT_NAME="ME$FAILED_PRF_THREAD" EXT_VERSION="2" TARGET_TYPE="host"><CollectionItem NAME="ME$FAILED_PRF_THREAD" UPLOAD="YES">
<TargetCollectionExt EXT_NAME="ME$FAILED_PDT_THREAD" EXT_VERSION="1" TARGET_TYPE="host"><CollectionItem NAME="ME$FAILED_PDT_THREAD" UPLOAD="YES">
<Schedule>
<IntervalSchedule INTERVAL="1" TIME_UNIT="Hr"/>
</Schedule>
<MetricColl NAME="ME$FAILED_PRF_THREAD">
<Condition COLUMN_NAME="Status" CRITICAL="2" OPERATOR="EQ" OCCURRENCES="1" MESSAGE="Failed PRF thread for %keyValue%" CLEAR_MESSAGE="No failed PRF threads"/>
<MetricColl NAME="ME$FAILED_PDT_THREAD">
<Condition COLUMN_NAME="Status" CRITICAL="2" OPERATOR="EQ" OCCURRENCES="1" MESSAGE="Failed PDT thread for %keyValue%" CLEAR_MESSAGE="No failed PRF threads"/>
</MetricColl>
</CollectionItem>
</TargetCollectionExt>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<MetricExtensionArchive name="MEAME$FAILED_PDT_THREAD">
<MetricExtension name="ME$FAILED_PDT_THREAD" type="host" version="1" is_repos="FALSE" display_name="Failed PDT Thread" description="Detect failure of Parallel Data Threads" version_comment=" " metadata_digest="83c0ffbab5a51720b3e3e7029e918d9f" coll_digest="366bab14a648562fffc7571eac62ef27" attach_digest="cd0b479c50ca3631d2b62637c31baa41">
<scripts name="pdt_thread_status.sh">
</scripts>
</MetricExtension>
</MetricExtensionArchive>
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<TargetMetadataExt EXT_NAME="ME$FAILED_PRF_THREAD" EXT_VERSION="2" TARGET_TYPE="host"><Metric NAME="ME$FAILED_PRF_THREAD" TYPE="TABLE">
<TargetMetadataExt EXT_NAME="ME$FAILED_PDT_THREAD" EXT_VERSION="1" TARGET_TYPE="host"><Metric NAME="ME$FAILED_PDT_THREAD" TYPE="TABLE">
<Display>
<Label NLSID="NLS_METRIC_hostME$FAILED_PRF_THREAD">Failed PRF Thread</Label>
<Description NLSID="NLS_DESCRIPTION_hostME$FAILED_PRF_THREAD">Detect failure of custom performance monitoring threads</Description>
<Label NLSID="NLS_METRIC_hostME$FAILED_PDT_THREAD">Failed PDT Thread</Label>
<Description NLSID="NLS_DESCRIPTION_hostME$FAILED_PDT_THREAD">Detect failure of Parallel Data Threads</Description>
</Display>
<TableDescriptor>
<ColumnDescriptor NAME="COMPONENT_ID" TYPE="NUMBER" IS_KEY="TRUE">
<Display>
<Label NLSID="NLS_COLUMN_hostME$FAILED_PRF_THREADCOMPONENT_ID">Component ID</Label>
<Label NLSID="NLS_COLUMN_hostME$FAILED_PDT_THREADCOMPONENT_ID">Component ID</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="THREAD_ID" TYPE="NUMBER" IS_KEY="TRUE">
<Display>
<Label NLSID="NLS_COLUMN_hostME$FAILED_PRF_THREADTHREAD_ID">Thread ID</Label>
<Label NLSID="NLS_COLUMN_hostME$FAILED_PDT_THREADTHREAD_ID">Thread ID</Label>
</Display>
</ColumnDescriptor>
<ColumnDescriptor NAME="Status" TYPE="NUMBER">
<Display>
<Label NLSID="NLS_COLUMN_hostME$FAILED_PRF_THREADStatus">Thread Status</Label>
<Label NLSID="NLS_COLUMN_hostME$FAILED_PDT_THREADStatus">Thread Status</Label>
</Display>
<CategoryValue CLASS="Default" CATEGORY_NAME="Fault">
</CategoryValue>
</ColumnDescriptor>
</TableDescriptor>
<QueryDescriptor FETCHLET_ID="OSLineToken">
<Property NAME="command" SCOPE="GLOBAL">/bin/bash</Property>
<Property NAME="script" SCOPE="GLOBAL" OPTIONAL="TRUE">%scriptsDir%/prf_thread_status.sh</Property>
<Property NAME="script" SCOPE="GLOBAL" OPTIONAL="TRUE">%scriptsDir%/pdt_thread_status.sh</Property>
<Property NAME="scriptLoc" SCOPE="GLOBAL" OPTIONAL="TRUE">%scriptsDir%</Property>
<Property NAME="delimiter" SCOPE="GLOBAL" OPTIONAL="TRUE">|</Property>
<Property NAME="ENVEM_TARGET_NAME" SCOPE="INSTANCE" OPTIONAL="TRUE">NAME</Property>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Get status code for PRF threads (2=failed)
# Get status code for PDT threads (2=failed)
#

. ~/.bash_profile
Expand All @@ -15,7 +15,8 @@ SET HEAD OFF
SET PAGES 0
SELECT component_id||'|'||thread_id||'|'||status
FROM delius_app_schema.pdt_thread
WHERE component_id BETWEEN 500 AND 505
WHERE component_id BETWEEN 500 AND 505 -- Performance Monitoring Threads (PRF)
OR component_id BETWEEN 100 AND 107 -- Alfresco Message Queue Threads
ORDER BY component_id, thread_id;
EXIT
EOSQL

This file was deleted.

Loading