Last active
August 7, 2018 11:10
-
-
Save kevsersrca/6eb307bf21f8e5f3d84a58379aae1e98 to your computer and use it in GitHub Desktop.
influxdbtest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Yeni db oluşturulması | |
curl -XPOST "http://localhost:8086/query?u=user&p=pass" --data-urlencode "q=CREATE DATABASE monitor" | |
//insert işlemi | |
curl -XPOST "http://localhost:8086/write?db=monitor&u=user&p=pass" -d 'network_traffic,host=test,interface=eth1,direction=inbound value=1' | |
//select işlemi | |
curl -G "http://localhost:8086/query?pretty=true&u=user&p=pass" --data-urlencode "db=mydb" --d "q=SELECT * FROM network_traffic" | |
//Script Örneği | |
counter=1 | |
while [ $counter -le 1000 ] | |
do | |
curl -XPOST "http://localhost:8086/write?db=monitor&u=user&p=pass" -d "network_traffic,host=test,interface=eth1,direction=inbound value=$counter" | |
((counter++)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment