4

i am looking for a way to iterate over the whole cache and get a list of object URL's - that are currently inside the storage.

is there any varnish command i am missing. or does anyone have a good starting poiunt for iterating over objects from within a vmod?

regards

Helmut Januschka
  • 1,578
  • 3
  • 16
  • 34
  • Did you find any way to do this Helmut? –  Apr 14 '17 at 07:09
  • @SuperDuperApps sadly not, i was digging into varnish source, and havn't yet found a way to retreive full urls. as they do not seem to be stored inside the SHM - only the hash of the url. since my ETA is near, i now run `varnishncsa` from within a node app - and keep track of the URL's - and expose them via REST api (where i can search for urls). its not the most beautiful thing, but it works. – Helmut Januschka Apr 14 '17 at 07:19
  • 2
    Just in case you're still interested in the feature I created a VMOD to do this: https://github.com/carlosabalde/libvmod-gossip. Please, let me know if you give it a try :) – Carlos Abalde May 28 '18 at 11:12

1 Answers1

6

with this command, you see hit and miss

varnishncsa -F '%U%q %{Varnish:hitmiss}x'

  • i ended up doing it this way, but indeed i am looking for a way without having to write to a logfile - or keeping a command running like this. – Helmut Januschka Apr 06 '17 at 05:50