# Kapacitor service not enabled

**URL:** <https://community.influxdata.com/t/kapacitor-service-not-enabled/23388>\
**Category:** Kapacitor\
**Created:** [January 16, 2022, 9:22am UTC](https://community.influxdata.com/t/kapacitor-service-not-enabled/23388 "2022-01-16T09:22:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julien\_BRUNET](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/julien_brunet/32/9015_2.png) [@Julien\_BRUNET](https://community.influxdata.com/u/Julien_BRUNET)\
**Post date:** [January 16, 2022, 9:22am UTC](https://community.influxdata.com/t/kapacitor-service-not-enabled/23388/1 "2022-01-16T09:22:28Z")

</div>

Hello I have the following problem when I try to configure kapacitor with Chronograf and influx db, everything works correctly I can send alerts on Slack or Alerta. For the moment when I stopped Chronograf service which contains the settings property i faced a issue .  
In kapacitor i can see in the logs : [kapacitor \*\*\*service Alerta / Slack \*\*\* is not enabled]  
in other words how to tell kapacitor to play the configuration present /etc/kapacitor/kapacitor.conf and not the settings in chronoaf DB.  
I have the impression that this one is overloaded in influxdb

---

<div class="post-metadata">

**Author:** ![Julien\_BRUNET](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/julien_brunet/32/9015_2.png) [@Julien\_BRUNET](https://community.influxdata.com/u/Julien_BRUNET)\
**Post date:** [January 16, 2022, 9:30am UTC](https://community.influxdata.com/t/kapacitor-service-not-enabled/23388/2 "2022-01-16T09:30:14Z")

</div>

For information this the config kapacitor working wih alerta with chronograf

```auto
[alerta]
  # Configure Alerta.
  enabled = true
  # The Alerta URL.
  url = "http://serverwww3301.ovh.as44099.net:9443/api"
  # Default authentication token.
  token = "XXXXXXXXXXXXXXO93IEjffv5hOuPNT0C9zyl8du"
  # Default token prefix
  # If you are on older versions of alerta you may need to change this to "Key"
  token-prefix = "Key"
  # Default environment.
  environment = "production"
  # Default origin.
  origin = "kapacitor"

```

is there a way to work kapacitor and influxdb without chronograf service ?

---

<div class="post-metadata">

**Author:** ![philb](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/philb/32/1805_2.png) [@philb](https://community.influxdata.com/u/philb)\
**Post date:** [January 17, 2022, 9:29am UTC](https://community.influxdata.com/t/kapacitor-service-not-enabled/23388/3 "2022-01-17T09:29:40Z")

</div>

Hello,

You can configure Kapacitor to subsribe to your database in the [influxdb](https://docs.influxdata.com/kapacitor/v1.6/administration/configuration/#influxdb) configuration in the Kapacitor conf file.

You can set multiple database subscriptions by repeating the whole [[influxdb]] block.

Configure that to use your database,. The enable tasks with Kapacitor:

1. Save your task as a .tick file

2. Copy to a location on your server

3. `sudo kapacitor define TaskName -type stream OR batch -tick /Path_To_TickFile -dbrp YourDatabase.RetentionPolicy`

4. `sudo kapacitor enable TaskName`

That should define your task and run it without the need for Chronograf.

you can track whether the tasks are running with

sudo kapacitor list tasks - Shows all defined tasks

kapacitor show task TaskName - Shows a breakdown of the nodes in your script, how many points are processed and if there are any errors

kapacitor watch TaskName - shows the task as it runs, any queries that are processed. I use this to check downsampling and make sure the queries completed successfully

Presonally i only use Chronograf to generate a base template for a script. Once i have that i copy it to an IDE and save it, removing the task from Chronograf afterwards.

Additional, i mentioned defining multiple databases. you don’t need to do this if you have 2 database’s on the same influx instance.

You can define one default database, but in your tick scripts you can specify a different database. you just need to update the -dbrp parameter to use the second database and retention policy.

Hope that helps

---

<div class="post-metadata">

**Author:** ![Julien\_BRUNET](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/julien_brunet/32/9015_2.png) [@Julien\_BRUNET](https://community.influxdata.com/u/Julien_BRUNET)\
**Post date:** [January 17, 2022, 1:42pm UTC](https://community.influxdata.com/t/kapacitor-service-not-enabled/23388/4 "2022-01-17T13:42:18Z")

</div>

@hello Philb  
thanks for your reply  
I have succesfully enable my task like below:

kapacitor list tasks

```auto
ID Type Status Executing Databases and Retention Policies
Application-services-V1 stream enabled true ["sys_metrics"."one_month"]

```

as a reminder when I configure kapacitor via the chronograf admin interface it works I just don’t want to connect to chronograf to configure my alerts since anyway I go to the command line  
but whitout chronograf i have the following issue in logs kapacitor:  
the config alerta is above this thread.

```auto
kapacitor version Kapacitor OSS 1.6.2 and alerta service : Alerta Release 8.7
ts=2022-01-17T14:32:35.419+01:00 lvl=error msg="failed to send event to Alerta" service=alerta task=Application-services-V1 err="service is not enabled"

```

I’m out of ideas if you have a lead it will help me a lot

regards

Julien

---

<div class="post-metadata">

**Author:** ![Julien\_BRUNET](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/julien_brunet/32/9015_2.png) [@Julien\_BRUNET](https://community.influxdata.com/u/Julien_BRUNET)\
**Post date:** [January 17, 2022, 2:31pm UTC](https://community.influxdata.com/t/kapacitor-service-not-enabled/23388/5 "2022-01-17T14:31:02Z")

</div>

How to execute the func TestServer\_DoServiceTest ?  
in Kapacitor CLI ?

`kapacitor service-tests alerta`  
`Service Success Message`  
`alerta false service is not enabled`
