7.1 Testing the Count Connector
Exercise
Start the Gateway:
In the Gateway terminal window run:
Start the Agent:
In the Agent terminal window run:
Send 12 Logs lines with the Loadgen:
In the Spans terminal window send 12 log lines, they should be read in two intervals. Do this with the following loadgen command:
Both the Agent and Gateway will display debug information, showing they are processing data. Wait until the loadgen completes.
Verify metrics have been generated
As the logs are processed, the Agent generates metrics and forwards them to the Gateway, which then writes them to gateway-metrics.out.
To check if the metrics logs.full.count, logs.sw.count, logs.lotr.count, and logs.error.count are present in the output, run the following jq query:
Tip
Note: the logs.full.count normally is equal to logs.sw.count + logs.lotr.count, while the logs.error.count will be a random number.
Important
Stop the Agent and the Gateway processes by pressing Ctrl-C in their respective terminals.