[prometheus-users] Re: No joy from Prometheus snapshot

2020-07-06 Thread Mike Spreitzer
Interestingly, the Prometheus server running against the new snapshot 
logged some compactions after about a minute.

...
level=info ts=2020-07-07T01:57:08.694Z caller=main.go:646 msg="Server is 
ready to receive web requests."
level=info ts=2020-07-07T01:58:18.185Z caller=compact.go:441 component=tsdb 
msg="compact blocks" count=3 mint=159401520 maxt=159403680 ulid=
01ECKFX8HKYEP8Y2YPX2WB0PC3 sources="[01ECHNMH8MRPZYHM8KXKBE60ZA 
01ECHWG8GCAZWMW1JDZB9ERQ0N 01ECJ3BZRM3SP7XQAZRJ867C30]" duration=
9.494006165s
level=info ts=2020-07-07T01:58:27.860Z caller=compact.go:441 component=tsdb 
msg="compact blocks" count=3 mint=159403680 maxt=159405840 ulid=
01ECKFXHV47D51X0GREQM6QZE3 sources="[01ECJA7Q18RT0VW9S5HKSVDP0J 
01ECJH3E8ENEWVK8E41G5XWM71 01ECJQZ5GB6TGV21QMHCWZ3JFY]" duration=9.64782793s
level=info ts=2020-07-07T01:58:37.619Z caller=compact.go:441 component=tsdb 
msg="compact blocks" count=3 mint=159405840 maxt=159408000 ulid=
01ECKFXV9PSG91VCTAMAVKZ1YR sources="[01ECJYTWRJZG6YSGH3XBTJK6CX 
01ECK5PQETDE8VDRSR6NZ6FGXQ 01ECKCJEPAJ19AJ7DXJY6K6P6B]" duration=
9.725054346s
level=info ts=2020-07-07T01:58:53.953Z caller=compact.go:441 component=tsdb 
msg="compact blocks" count=3 mint=159401520 maxt=159408000 ulid=
01ECKFY4TFCY2J3KQ30VSZFRKS sources="[01ECKFX8HKYEP8Y2YPX2WB0PC3 
01ECKFXHV47D51X0GREQM6QZE3 01ECKFXV9PSG91VCTAMAVKZ1YR]" duration=
16.305728942s

This server logged finding 10 blocks when it started (see my previous 
email); those compactions compacted the first 9 blocks into one.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/67ceeb43-6e7c-43b4-96a1-519d7405c6dao%40googlegroups.com.


[prometheus-users] Re: No joy from Prometheus snapshot

2020-07-06 Thread Mike Spreitzer
I suspected the relative directory and then noticed the double equal in the 
prometheus command line.  So I erased the old snapshot and tried again.

sysop@r26data0:/var/lib/prometheus/snapshots$ ls
sysop@r26data0:/var/lib/prometheus/snapshots$ curl -X POST http:
//localhost:30909/api/v1/admin/tsdb/snapshot
{"status":"success","data":{"name":"20200707T015331Z-b7fbfbcafd915bb"}}
sysop@r26data0:/var/lib/prometheus/snapshots$ 
sysop@r26data0:/var/lib/prometheus/snapshots$ ls -la
total 12
drwxr-xr-x  3 nobody nogroup 4096 Jul  7 01:53 .
drwxr-xr-x 14 nobody   65533 4096 Jul  7 00:59 ..
drwxr-xr-x 12 nobody nogroup 4096 Jul  7 01:53 20200707T015331Z-
b7fbfbcafd915bb

Next I run the server again.  This time it logs messages about finding data 
blocks.

sysop@r26data0:/var/lib/prometheus/snapshots/20200707T015331Z-b7fbfbcafd915bb$ 
sudo -u nobody ~/prometheus --storage.tsdb.path=$PWD 
 --web.enable-admin-api --config.file=$HOME/prom-config/config.yaml
level=info ts=2020-07-07T01:57:08.662Z caller=main.go:302 msg="No time or 
size retention was set so using the default time retention" duration=15d
level=info ts=2020-07-07T01:57:08.662Z caller=main.go:337 msg="Starting 
Prometheus" version="(version=2.19.1, branch=HEAD, 
revision=eba3fdcbf0d378b66600281903e3aab515732b39)"
level=info ts=2020-07-07T01:57:08.662Z caller=main.go:338 
build_context="(go=go1.14.4, 
user=root@62700b3d0ef9, date=20200618-16:35:26)"
level=info ts=2020-07-07T01:57:08.662Z caller=main.go:339 host_details="(Linux 
4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 
r26data0 (none))"
level=info ts=2020-07-07T01:57:08.662Z caller=main.go:340 
fd_limits="(soft=65535, 
hard=65535)"
level=info ts=2020-07-07T01:57:08.662Z caller=main.go:341 
vm_limits="(soft=unlimited, 
hard=unlimited)"
level=info ts=2020-07-07T01:57:08.664Z caller=main.go:678 msg="Starting 
TSDB ..."
level=info ts=2020-07-07T01:57:08.664Z caller=web.go:524 component=web 
msg="Start 
listening for connections" address=0.0.0.0:9090
level=info ts=2020-07-07T01:57:08.664Z caller=repair.go:59 component=tsdb 
msg="Found healthy block" mint=159401520 maxt=159402240 ulid=
01ECHNMH8MRPZYHM8KXKBE60ZA
level=info ts=2020-07-07T01:57:08.664Z caller=repair.go:59 component=tsdb 
msg="Found healthy block" mint=159402240 maxt=159402960 ulid=
01ECHWG8GCAZWMW1JDZB9ERQ0N
level=info ts=2020-07-07T01:57:08.664Z caller=repair.go:59 component=tsdb 
msg="Found healthy block" mint=159402960 maxt=159403680 ulid=
01ECJ3BZRM3SP7XQAZRJ867C30
level=info ts=2020-07-07T01:57:08.664Z caller=repair.go:59 component=tsdb 
msg="Found healthy block" mint=159403680 maxt=159404400 ulid=
01ECJA7Q18RT0VW9S5HKSVDP0J
level=info ts=2020-07-07T01:57:08.664Z caller=repair.go:59 component=tsdb 
msg="Found healthy block" mint=159404400 maxt=159405120 ulid=
01ECJH3E8ENEWVK8E41G5XWM71
level=info ts=2020-07-07T01:57:08.664Z caller=repair.go:59 component=tsdb 
msg="Found healthy block" mint=159405120 maxt=159405840 ulid=
01ECJQZ5GB6TGV21QMHCWZ3JFY
level=info ts=2020-07-07T01:57:08.665Z caller=repair.go:59 component=tsdb 
msg="Found healthy block" mint=159405840 maxt=159406560 ulid=
01ECJYTWRJZG6YSGH3XBTJK6CX
level=info ts=2020-07-07T01:57:08.665Z caller=repair.go:59 component=tsdb 
msg="Found healthy block" mint=159406560 maxt=159407280 ulid=
01ECK5PQETDE8VDRSR6NZ6FGXQ
level=info ts=2020-07-07T01:57:08.665Z caller=repair.go:59 component=tsdb 
msg="Found healthy block" mint=159407280 maxt=159408000 ulid=
01ECKCJEPAJ19AJ7DXJY6K6P6B
level=info ts=2020-07-07T01:57:08.665Z caller=repair.go:59 component=tsdb 
msg="Found healthy block" mint=159408000 maxt=1594086829277 ulid=
01ECKFMSZ5XDWD5296R3C8ZXZ6
level=info ts=2020-07-07T01:57:08.688Z caller=head.go:645 component=tsdb msg
="Replaying WAL and on-disk memory mappable chunks if any, this may take a 
while"
level=info ts=2020-07-07T01:57:08.688Z caller=head.go:706 component=tsdb msg
="WAL segment loaded" segment=0 maxSegment=0
level=info ts=2020-07-07T01:57:08.688Z caller=head.go:709 component=tsdb msg
="WAL replay completed" duration=365.54µs
level=info ts=2020-07-07T01:57:08.690Z caller=main.go:694 fs_type=
EXT4_SUPER_MAGIC
level=info ts=2020-07-07T01:57:08.690Z caller=main.go:695 msg="TSDB started"
level=info ts=2020-07-07T01:57:08.690Z caller=main.go:799 msg="Loading 
configuration file" filename=/home/sysop/prom-config/config.yaml
level=info ts=2020-07-07T01:57:08.694Z caller=main.go:827 msg="Completed 
loading of configuration file" filename=/home/sysop/prom-config/config.yaml
level=info ts=2020-07-07T01:57:08.694Z caller=main.go:646 msg="Server is 
ready to receive web requests."

The last data block ends about 5 minutes ago.

sysop@r26data0:~$ date --date @1594086829
Tue Jul  7 01:53:49 UTC 2020

But still no data.

sysop@r26data0:~$ curl http://localhost:9090/api/v1/metadata
{"status":"success","data":{}}sysop@r26data0:~$ 

The web UI shows the following for "/status".

Runtime