Monitoring

Monitoring Options

The available cli options are -a, -av, and --wait. You can use these options in any combination.

Use -c or --confidence-threshold to specify a universal percentage confidence threshold for monitoriting only.

Use -a or --account-name to specify a chained account to use for disputing:

cli -a <your account name without quotes>

Use -av to get an alert for all NewReport events (regardless of whether they are disputable or not):

cli -av

Wait Between Checks

If you leave it as default, your DVM will scan the chain every few seconds for new reports.

Use the -w (wait) option to set how often DVM will check for new reports:

cli -w 120

Configuring QueryIDs and Thresholds to Monitor.

Monitored Feeds and their Thresholds are defined in the disputer-config.yaml file.

By default, the Auto-Disputer will monitor the PLS/USD feed with a threshold percentage of 10%. In the default dipsuter-config.yaml, attached to the project, this is represented as:

# AutoDisputer configuration file
feeds:
  - query_id: "0x83245f6a6a2f6458558a706270fbcc35ac3a81917602c1313d3bfa998dcc2d4b"
    threshold:
      type: Percentage
      amount: 0.1 # 10%

Where 0x83245f6a6a2f6458558a706270fbcc35ac3a81917602c1313d3bfa998dcc2d4b represents the queryId of the PLS/USD feed on Fetch Oracle.

It's recommended to monitor two 'simple' queries at once per DVM instance, although more is also possible.

To change the query being monitored, simply add the new QueryID in the query_id field, using quotes.

To change the percentage threshold to dispute or send alerts, change the amount field where:

0.1 = 10%

1 = 100%

For example, to monitor a second query in the form of a newQueryId, follow the same pattern while respecting the file indentation, like so:

- query_id: "0x83245f6a6a2f6458558a706270fbcc35ac3a81917602c1313d3bfa998dcc2d4b"
    threshold:
      type: Percentage
      amount: 0.1 # 10%
 - query_id: "newQueryID"
    threshold:
      type: Percentage
      amount: 0.75 # 75%

Last updated