Page MenuHomeFreeBSD

Update dwatch-json to 0.5, maintainership
Needs ReviewPublic

Authored by dteske on Fri, Aug 5, 5:45 PM.

Details

Reviewers
shurd
Summary

Update dwatch-json to the latest version and restore maintainership.

Test Plan

All currently-supported FreeBSD releases have dwatch and bsdconfig in base (the only required dependencies).

Install to FreeBSD releases of choice, copy /usr/local/etc/grafnet/grafnet.conf.sample to non-sample.

Execute "grafnet" to see usage.
Execute "grafnet trace" to see realtime network traffic.
Edit /usr/local/etc/grafnet/grafnet.conf and add a variable.
For example, dns='this->rport == 53'
Execute "grafnet show variable" (where "variable" is the variable you configured above)
For example, grafnet show dns
Execute "grafnet trace variable" to see realtime network traffic matching variable condition.
For example, grafnet trace dns
Execute "grafnet list"
Execute "grafnet start"
Execute "grafnet status" to confirm DTrace service is running.
Execute "grafnet status -a" to see telegraf service is not running.
Copy /usr/local/etc/grafnet/stats.conf.sample to non-sample.
Execute "grafnet start -a" to start the telegraf service (DTrace service reports already-running)
Execute "grafnet status -a" to see both Dtrace and telegraf service running.
Execute "tail /var/log/grafnet/grafnet.log" to see time-series data.
Execute "service grafnet extracommands"
Execute "service grafnet list" to make sure it looks the same as "grafnet list"
Execute "service grafnet trace dns" to make sure it works the same as "grafnet trace dns"
Execute "service grafnet status" and "service grafnet_stats status"
Load dashboard to make sure stats are making it into database from telegraf service.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

dteske requested review of this revision.Fri, Aug 5, 5:45 PM
dteske created this revision.

I discussed this submission with dteske on IRC and possibly have a few suggestions:

PORTNAME should correspond to the naming convention of installed files and usecase whenever possible, so dwatch-json --> dwatch-json-net and preferably libexec/dwatch/json-net* --> libexec/dwatch/dwatch-json-net*

Grafnet should be broken out, put in a separate port and be set as a dependency (if required) as it doesn't seem to be a hard requirement and/or limited to dwatch-json-net looking at pkg-descr

I discussed this submission with dteske on IRC and possibly have a few suggestions:

PORTNAME should correspond to the naming convention of installed files and usecase whenever possible, so dwatch-json --> dwatch-json-net and preferably libexec/dwatch/json-net* --> libexec/dwatch/dwatch-json-net*

Grafnet should be broken out, put in a separate port and be set as a dependency (if required) as it doesn't seem to be a hard requirement and/or limited to dwatch-json-net looking at pkg-descr

It is true that this was discussed. However, I tried to enlighten that:

  1. Files in $PREFIX/libexec/dwatch are modules and the filename is both the module name and what the user types to invoke the module. It would not only be redundant to force people to type "dwatch -X dwatch-json-net" when there are dozens of profiles in the base Operating System in /usr/libexec/dwatch and other ports (authored by me, such as dwatch-gource) which follow the standard of NOT including "dwatch-" in the dwatch module name. For additional information on how dwatch modules work and are expected to be formatted, see the BSDCAN 2018 slides for my presentation on dwatch at https://fraubsd.org/doc/bsdcan/2018/
  1. The PORTNAME argument ignores my other work and unnecessarily asks me to change the name of the port and then later change it back when I add non-network-related JSON modules.
  1. The argument that dwatch-json is not a hard requirement [of grafnet] is patently false. Requiring authors to internally document in pkg-descr that files that are part of a package rely on other files inside the same package seems overly burdensome.

    https://github.com/FrauBSD/dwatch-json/blob/bc978e4d6d6b075f5426c01d85217132c9d7d63a/grafnet/grafnet#L545 https://github.com/FrauBSD/dwatch-json/blob/bc978e4d6d6b075f5426c01d85217132c9d7d63a/grafnet/grafnet#L400

From my 2018 BSDCAN presentation slides, here are the modules in base ... we're not going to add "dwatch-" prefix to all those simply because a PORT convention says that a PORT should install files named the same as the PORT when the PORT should follow BASE convention already set forth 6 years ago