def index_cleaner(topic, value):
    logger.info('Time to delete the dashboard for topic %s', topic)
    r = requests.delete(dcs_dashboard_url, json={'records': [{'value': json.loads(value)}]})
    logger.info('Response: Code %s', r)
    logger.info('Time to delete the Elasticsearch index for topic %s', topic)
    subprocess.call(['/bin/bash', '/usr/bin/dcs/delete_logstash_pipeline.sh', topic, 'yes'])
def index_cleaner(topic, value):
    logger.info('Time to delete the dashboard for topic %s', topic)
    r = requests.delete(dcs_dashboard_url, json={'records': [{'value': json.loads(value)}]})
    logger.info('Response: Code %s', r)
    logger.info('Time to delete the Elasticsearch index for topic %s', topic)
    subprocess.call(['/bin/bash', '/usr/bin/dcs/delete_logstash_pipeline.sh', topic, 'yes'])