varnish / varnishgather

Information gathering tool for Varnish Cache.
45 stars 36 forks source link

Closes: #85; include in-use vcl file that is outside of /etc/varnish #90

Closed Zoljargal-Zolo-Jargalsaikhan closed 2 years ago

Zoljargal-Zolo-Jargalsaikhan commented 2 years ago

If the vcl_path is pointing outside of /etc/varnish or /usr, include those directories in the VCLs tar file.

dridi commented 2 years ago

This is not at all what I had in mind, so I should probably clarify the intent from #85.

There is a varnishd parameter literally called vcl_path and it should be used as the starting point to collect VCL files. So instead of having only /etc/varnish we would add the colon-separated list of directories from the vcl_path parameter (which by default encompasses /etc/varnish). The hard-coded /etc/varnish directory should remain as a fallback.

It also becomes interesting to collect includes only if they use absolute paths.

dridi commented 2 years ago

See #96 for what I had in mind: I find the value of vcl_path with varnishadm and start from there, with a fallback to a hardcoded /etc/varnish.

I also made include search recursive.