# Anomaly detection jobs health check

**URL:** <https://forum.opensearch.org/t/anomaly-detection-jobs-health-check/15492>\
**Category:** OpenSearch\
**Tags:** discuss, troubleshoot\
**Created:** [August 9, 2023, 4:14pm UTC](https://forum.opensearch.org/t/anomaly-detection-jobs-health-check/15492 "2023-08-09T16:14:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NAVYA\_GOLI](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@NAVYA\_GOLI](https://forum.opensearch.org/u/NAVYA_GOLI)\
**Post date:** [August 9, 2023, 4:14pm UTC](https://forum.opensearch.org/t/anomaly-detection-jobs-health-check/15492/1 "2023-08-09T16:14:28Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
Opensearch version 2.6

**Describe the issue** :  
In elasticsearch we have feature related to check the anomaly detection jobs health,

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/2/2b6d9b2209604ccba23ee813b43c1ceb7706f008.png)

Our requirement is to get similar features in opensearch,  
to get the model memory - I tried querying opensearch profile detector API, I am struck in finding out the features related to data feed has not started and data delay has occurred.

Could you please help me on this

**Configuration** :

**Relevant Logs or Screenshots** :

---

<div class="post-metadata">

**Author:** ![Gsmitt](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gsmitt/32/1718_2.png) [@Gsmitt](https://forum.opensearch.org/u/Gsmitt)\
**Post date:** [August 11, 2023, 4:15am UTC](https://forum.opensearch.org/t/anomaly-detection-jobs-health-check/15492/2 "2023-08-11T04:15:30Z")

</div>

Hey @NAVYA_GOLI

Done something simiar to that , but I didnt use Anomaly Detection I used the Alerting.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/e/e4d9efa4e0525555d8912805785cb9d7b7306616.png)

Example:

```auto
{
   "name": "Cluster Health Status",
   "type": "monitor",
   "monitor_type": "cluster_metrics_monitor",
   "enabled": true,
   "schedule": {
      "period": {
         "unit": "MINUTES",
         "interval": 1
      }
   },
   "inputs": [
      {
         "uri": {
            "api_type": "CLUSTER_HEALTH",
            "path": "_cluster/health",
            "path_params": "",
            "url": "http://localhost:9200/_cluster/health"
         }
      }
   ],
   "triggers": [
      {
         "query_level_trigger": {
            "id": "Fh94VYgBRnO25hGOnvYh",
            "name": "Cluster Health Status",
            "severity": "1",
            "condition": {
               "script": {
                  "source": "ctx.results[0].status == \"red\"",
                  "lang": "painless"
               }
            },
            "actions": [
               {
                  "id": "Fx94VYgBRnO25hGOnvYh",
                  "name": "Cluster Health Status",
                  "destination_id": "qR9mVYgBRnO25hGO-KYg",
                  "message_template": {
                     "source": "Monitor {{ctx.monitor.name}} just entered alert status. Please investigate the issue.\n - Trigger: {{ctx.trigger.name}}\n - Severity: {{ctx.trigger.severity}}\n - Period start: {{ctx.periodStart}}\n - Period end: {{ctx.periodEnd}}",
                     "lang": "mustache"
                  },
                  "throttle_enabled": false,
                  "subject_template": {
                     "source": "Cluster Status is red",
                     "lang": "mustache"
                  }
               }
            ]
         }
      }
   ],
   "ui_metadata": {
      "schedule": {
         "timezone": null,
         "frequency": "interval",
         "period": {
            "unit": "MINUTES",
            "interval": 1
         },
         "daily": 0,
         "weekly": {
            "tue": false,
            "wed": false,
            "thur": false,
            "sat": false,
            "fri": false,
            "mon": false,
            "sun": false
         },
         "monthly": {
            "type": "day",
            "day": 1
         },
         "cronExpression": "0 */1 * * *"
      },
      "monitor_type": "cluster_metrics_monitor",
      "search": {
         "searchType": "clusterMetrics",
         "timeField": "",
         "aggregations": [],
         "cleanedGroupBy": [],
         "bucketValue": 1,
         "bucketUnitOfTime": "h",
         "filters": []
      }
   }
}

```
