The disk on the AWS server hosting our influxd filled up and I’m now trying to resurrect the system. Since the web interface doesn’t connect, I’ve logged into the server directly and I’m trying to communicate with influxd via the command line.
what I’ve tried
Attempting to connect via the web interface gives a “refused to connect”. So instead, I’ve logged into the server directly.
influx command line interface
I can see that there is an influxd running on the system:
# ps guxww | grep influx root 799 1.1 22.4 5975488 228300 ? Ssl 16:03 0:21 influxd root 16831 0.0 0.2 10468 2184 pts/0 S+ 16:33 0:00 grep influx
My attempt to use the
influx app doesn’t work (although the .conf file does specify port 8086):
# ./influx Failed to connect to http://localhost:8086 Please check your connection settings and ensure 'influxd' is running.
cURL fares better, but I’m troubled by the empty response – there should be more than zero databases in the system. Am I structuring the query properly?
$ curl -G "http://localhost:8086/query" -u $user:$pass --trace-ascii /tmp/dump.txt --data-urlencode "q=SHOW DATABASES" == Info: Hostname was NOT found in DNS cache == Info: Trying ::1... == Info: Connected to localhost (::1) port 8086 (#0) == Info: Server auth using Basic with user 'aquadyne' => Send header, 169 bytes (0xa9) 0000: GET /query?q=SHOW%20DATABASES HTTP/1.1 0028: Authorization: Basic YXF1YWR5bmU6ZWpsb0tMeThkSUsxMExxdHdkeW5SeA= 0068: = 006b: User-Agent: curl/7.35.0 0084: Host: localhost:8086 009a: Accept: */* 00a7: == Info: Empty reply from server == Info: Connection #0 to host localhost left intact curl: (52) Empty reply from server
my real goal
Ultimately, I’d like to prune old entries from the database(s) – whoever set up the system didn’t implement any retention policy, which is one reason the disk filled up.
But to do that, I need to perform basic queries to the db. Is there something obvious I’m missing?