Skip to content

Instantly share code, notes, and snippets.

@Neraud
Neraud / create_index_template.sh
Created March 28, 2023 21:31
Crowdsec Elasticsearch notification index template creation
#!/usr/bin/env bash
curl -X PUT \
--data "@index_template.json" \
-u user:password \
-H "Content-Type: application/json" \
http://127.0.0.1:9200/_index_template/crowdsec
@Neraud
Neraud / create_index.sh
Created March 25, 2023 22:07
Crowdsec Elasticsearch notification index creation
#!/usr/bin/env bash
curl -X PUT \
--data "@index_with_mapping.json" \
-u user:password \
-H "Content-Type: application/json" \
http://127.0.0.1:9200/crowdsec
apiVersion: v1
kind: ConfigMap
metadata:
name: echo-config
namespace: default
data:
text: first
package main
import (
"time"
"strconv"
"github.com/gluster/gluster-prometheus/pkg/glusterutils"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
)