On Thu, Apr 08, 2021 at 07:34:00PM +0000, Job Snijders wrote: > Hi all, > > The below patch exposes two metrics via JSON. This will remove the need > for some rpki-client affiniadios to screen scrape rpki-client's STDOUT. > > OK? >
OK claudio@ > Index: output-json.c > =================================================================== > RCS file: /cvs/src/usr.sbin/rpki-client/output-json.c,v > retrieving revision 1.14 > diff -u -p -r1.14 output-json.c > --- output-json.c 9 Dec 2020 11:29:04 -0000 1.14 > +++ output-json.c 8 Apr 2021 19:27:57 -0000 > @@ -58,7 +58,9 @@ outputheader_json(FILE *out, struct stat > "\t\t\"gbrs\": %zu,\n" > "\t\t\"repositories\": %zu,\n" > "\t\t\"vrps\": %zu,\n" > - "\t\t\"uniquevrps\": %zu\n" > + "\t\t\"uniquevrps\": %zu,\n" > + "\t\t\"cachedir_del_files\": %zu,\n" > + "\t\t\"cachedir_del_dirs\": %zu\n" > "\t},\n\n", > hn, tbuf, (long long)st->elapsed_time.tv_sec, > (long long)st->user_time.tv_sec, (long long)st->system_time.tv_sec, > @@ -69,7 +71,8 @@ outputheader_json(FILE *out, struct stat > st->crls, > st->gbrs, > st->repos, > - st->vrps, st->uniqs) < 0) > + st->vrps, st->uniqs, > + st->del_files, st->del_dirs) < 0) > return -1; > return 0; > } > -- :wq Claudio
