Influxdb: Enhancement commands for managing subscription

Created on 30 Nov 2016  路  3Comments  路  Source: influxdata/influxdb

Feature Request

__Proposal:__ [Description of the feature]
Add the commands for to achieve the following

  1. Allow Admin to disable & Enable all subscription
    DISABLE SUBSCRIPTION ALL ==> will disable the subscription, will NOT remove the subscriptions
    ENABLE SUBSCRIPTION ALL ==> Will enable all the subscriptions as per the previously subscribed entries
  1. ALL Admin user to remove all subscriptions
    DROP SUBSCRIPTION ALL ==> will remove all subscriptions from all database

  2. Allow Admin to remove subscription for giving for giving kapacitor destination id (shown in show subscriptions commands)
    e.g: DROP SUBSCRIPTION => should remove the subscription of this ID from all the databases

  3. Remove ALL subscriptions for particular database
    e.g: DROP SUBSCRIPTION ALL on . ==> should remove all subscription on the given database & policy
    e.g: DROP SUBSCRIPTION ALL on ==> Should remove all subscription on the database

__Current behavior:__ [What currently happens]
Manually every subscription for every entry needs to be dropped, which is painful.

__Desired behavior:__ [What you would like to happen]
Admin user should be able to manage subscription with few commands as stated above.

__Use case:__ [Why is this important (helps with prioritizing requests)]
When Kapacitors are down or not in use, The influxDB are sending all data points to Kapacitor.. Not sure why they will send each every data.. Administration

1.x areauth kinfeature-request wontfix

Most helpful comment

In the mean time, here's a bash oneliner for dropping all subscriptions:

IFS=$'\n'; for i in $(influx -format csv -username $INFLUXUSER -password $INFLUXPASS -database _internal -execute 'show subscriptions' | tail -n +2 | grep -v name); do influx -format csv -username $INFLUXUSER -password $INFLUXPASS -database _internal -execute "drop subscription \"$(echo "$i" | cut -f 3 -d ',')\" ON \"$(echo "$i" | cut -f 1 -d ',')\".\"$(echo "$i" | cut -f 2 -d ',')\""; done

All 3 comments

In the mean time, here's a bash oneliner for dropping all subscriptions:

IFS=$'\n'; for i in $(influx -format csv -username $INFLUXUSER -password $INFLUXPASS -database _internal -execute 'show subscriptions' | tail -n +2 | grep -v name); do influx -format csv -username $INFLUXUSER -password $INFLUXPASS -database _internal -execute "drop subscription \"$(echo "$i" | cut -f 3 -d ',')\" ON \"$(echo "$i" | cut -f 1 -d ',')\".\"$(echo "$i" | cut -f 2 -d ',')\""; done

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings