# Watcher license expired with status code 403

**URL:** https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011
**Category:** Elasticsearch
**Tags:** license
**Created:** [March 6, 2019, 1:27am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011 "2019-03-06T01:27:46Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![dis](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@dis](https://discuss.elastic.co/u/dis)
#### Post date: [March 6, 2019, 1:27am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/1 "2019-03-06T01:27:47Z")

</div>

Hi,

I get the license expired error when trying to insert a watch. But in the elasticsearch server startup I see the watcher module is loaded. The curl command is executed inside the es-master container. Maybe, I'm not inserting the watcher correctly.

[2019-03-04T14:12:30,550][INFO][o.e.p.PluginsService] [es-master-56dcf5b6c7-ptn7g] loaded module [x-pack- **watcher**]

{"error":{"root\_cause":[{"type":"security\_exception","reason":"current license is non-compliant for [watcher]","license.expired.feature":"watcher"}],"type":"security\_exception","reason":"current license is non-compliant for [watcher]","license.expired.feature":"watcher"},"status":403}

curl -X PUT "[http://localhost:9200/\_xpack/watcher/watch/my-watch](http://localhost:9200/_xpack/watcher/watch/my-watch)" -H 'Content-Type: application/json' -d'  
{  
"trigger" : {  
"schedule" : { "cron" : "0 0/1 \* \* \* ?" }  
},  
"input" : {  
"search" : {  
"request" : {  
"indices" : [  
"logstash\*"  
],  
"body" : {  
"query" : {  
"bool" : {  
"must" : {  
"match": {  
"response": 404  
}  
},  
"filter" : {  
"range": {  
"@timestamp": {  
"from": "{{ctx.trigger.scheduled\_time}}||-5m",  
"to": "{{ctx.trigger.triggered\_time}}"  
} } } } } } } } },  
"condition" : {  
"compare" : { "ctx.payload.hits.total" : { "gt" : 0 }}  
},  
"actions" : {  
"email\_admin" : {  
"email" : {  
"to" : "admin@domain.host.com",  
"subject" : "404 recently encountered"  
}}}}'

Thanks.

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [March 6, 2019, 2:15am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/2 "2019-03-06T02:15:28Z")

</div>

What do you get from the `_xpack/license` and `_xpack/` APIs?

---

<div class="post-metadata">

### Author: ![dis](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@dis](https://discuss.elastic.co/u/dis)
#### Post date: [March 6, 2019, 3:43am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/3 "2019-03-06T03:43:51Z")

</div>

curl -X GET "localhost:9200/\_xpack/license"  
{  
"license" : {  
"status" : "active",  
"uid" : "391a7c72-4bcc-417d-b6cc-69aa2f6d0b41",  
"type" : "basic",  
"issue\_date" : "2019-03-04T14:14:00.416Z",  
"issue\_date\_in\_millis" : 1551708840416,  
"max\_nodes" : 1000,  
"issued\_to" : "es-cluster",  
"issuer" : "elasticsearch",  
"start\_date\_in\_millis" : -1  
} }

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [March 6, 2019, 4:13am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/4 "2019-03-06T04:13:22Z")

</div>

> [@dis](#):
>
> Can you point me to where to get the output of \_xpack/license and \_xpack/API?

You need to call these APIs on your elasticsearch node:

```auto
curl "http://localhost:9200/_xpack/license"

curl "http://localhost:9200/_xpack/"

```

---

<div class="post-metadata">

### Author: ![dis](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@dis](https://discuss.elastic.co/u/dis)
#### Post date: [March 6, 2019, 4:15am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/5 "2019-03-06T04:15:42Z")

</div>

curl -X GET "localhost:9200/\_xpack"

{"build":{"hash":"fe40335","date":"2018-10-30T23:21:04.411928Z"},"license":{"uid":"391a7c72-4bcc-417d-b6cc-69aa2f6d0b41","type":"basic","mode":"basic","status":"active"},"features":{"graph":{"description":"Graph Data Exploration for the Elastic Stack","available":false,"enabled":true},"logstash":{"description":"Logstash management component for X-Pack","available":false,"enabled":true},"ml":{"description":"Machine Learning for the Elastic Stack","available":false,"enabled":true,"native\_code\_info":{"version":"6.4.3","build\_hash":"7a0781676dd492"}},"monitoring":{"description":"Monitoring for the Elastic Stack","available":true,"enabled":false},"rollup":{"description":"Time series pre-aggregation and rollup","available":true,"enabled":true},"security":{"description":"Security for the Elastic Stack","available":false,"enabled":false},"_ **watcher":{"description":"Alerting, Notification and Automation for the Elastic Stack","available":false,"enabled":true}},"tagline":"You know, for X** _"}

Cannot make sense from the message, available is false but enabled is true.

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [March 6, 2019, 7:16am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/6 "2019-03-06T07:16:59Z")

</div>

> [@dis](#):
>
> "type":"basic"

You are running with a _basic_ license.  
The [subscriptions page](https://www.elastic.co/subscriptions) shows what features are available on which license type - Watcher requires a paid license of _Gold_ or higher.

> [@dis](#):
>
> Cannot make sense from the message, available is false but enabled is true.

It's not available because it's not allowed on this license type.  
It's enabled, because it would be automatically enabled if the license was upgraded to a type that allowed its use.

---

<div class="post-metadata">

### Author: ![dis](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@dis](https://discuss.elastic.co/u/dis)
#### Post date: [March 6, 2019, 7:23am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/7 "2019-03-06T07:23:47Z")

</div>

Is there a trial license for watcher I can test it out?

Also how do I upgrade from basic to paid license in realtime?

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [March 6, 2019, 11:19am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/8 "2019-03-06T11:19:31Z")

</div>

[https://www.elastic.co/guide/en/elastic-stack-overview/6.4/license-management.html](https://www.elastic.co/guide/en/elastic-stack-overview/6.4/license-management.html)

---

<div class="post-metadata">

### Author: ![dis](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@dis](https://discuss.elastic.co/u/dis)
#### Post date: [March 6, 2019, 2:06pm UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/9 "2019-03-06T14:06:25Z")

</div>

In order to enable the Watcher feature do I need to update the temporary license with acknowledge set to 'true' and type would be set to not 'basic' (maybe use 'trial'). Is that the correct way to enable Watcher as trial when updating the current license? Thanks.

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [March 7, 2019, 12:30am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/10 "2019-03-07T00:30:13Z")

</div>

At the top of that page:

> If you want to try the platinum features, you can start a 30-day trial. Go to the [License Management](https://www.elastic.co/guide/en/kibana/6.4/managing-licenses.html) page in Kibana or use the [start trial API](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/start-trial.html).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 4, 2019, 12:30am UTC](https://discuss.elastic.co/t/watcher-license-expired-with-status-code-403/171011/11 "2019-04-04T00:30:16Z")

</div>

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