Hallo,
* Sandro Tosi [Wed, May 13 2015, 09:56:56AM]:

> it would be nice if apt-cacher-ng had a cli switch to output the statistical
> information which currently only lives in the html output of report.html. It
> seems like that html page is just a "template" and some information are
> replacedby a-c-ng when it parses it, but if you want to graph those info the
> only solution at this time is parsing the html output, which is .. well
> suboptimal :)
> 
> Bonus point if the cli switch will output those info in an easily parsable
> manner, like YAML, JSON or other formats

Not sure I want to provide a CLI interface (probably not). The current
way is retrieving a special URL (see cron job script, you can also
encode parameters from the webui and admin credentials into that URL.
wget -qO- is your friend, IMHO).

Apart from that, here is sample output. Are we happy?

{
   "assignedSpace": {
      "debrep/dists/unstable/InRelease": 150471450,
      "debrep/dists/unstable/main/binary-amd64/Packages": 36001368,
      "debrep/dists/unstable/main/binary-amd64/Packages.diff/Index": 2260432,
      "debrep/dists/unstable/main/binary-amd64/Packages.xz": 7198500,
      "debrep/dists/unstable/main/binary-i386/Packages": 35943083,
      "debrep/dists/unstable/main/binary-i386/Packages.diff/Index": 7876,
      "debrep/dists/unstable/main/binary-i386/Packages.xz": 7197644,
      "debrep/dists/unstable/main/i18n/Translation-en.diff/Index": 108235,
      "debrep/dists/unstable/main/source/Sources": 36760788,
      "debrep/dists/unstable/main/source/Sources.diff/Index": 7876,
      "debrep/dists/unstable/main/source/Sources.gz": 9739685,
      "debrep/dists/unstable/main/source/Sources.xz": 7814020
   },
   "total": 293510957
}

Regards,
Eduard.


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to