This test streamings mpeg-dash video using the apache server monitored by Telegraf configured with a default apache plugin. The data is stored in the `clmc-service` using database `CLMCMetrics` and measurement `apache`
* clmc-service: configured with influx, kapacitor, chornograf
* apache1: configured with apache and a test video located at http://192.168.50.11:80/test-video/stream.mpd on the internal vbox network adn at http://localhost:8890/test-video/stream.mpd if accessing from the host machine
## Manual test on Windows
### View the video
Install VLC video client on the host machine, you must use a very recent version otherwise the MPD file cannot we read. At the time of writng the following nighly build was installed:
`Enter the network URL: http://localhost:8890/flame-video/stream.mpd`
The test video is the FLAME project video and it can be viewed at the following location.
`Enter the network URL: http://localhost:8890/test-video/stream.mpd`
The video should play.
### Query the data
Open Chronograph by entering the following URL into a browser on the host http://localhost:8888
Connect with
* Connection String: http://localhost:8086
* Name: Influx 1
* Telegraf database: CLMCMetrics
Press the Data Explorer in the menu
Select the apache measurement and create a query such as
`SELECT mean("BytesPerSec") AS "mean_BytesPerSec" FROM "CLMCMetrics"."autogen"."apache" WHERE time > now() - 5m GROUP BY time(10s)`
## Set a KPI trigger
Press Alerting in the menu
Connect to Kapacitor on http://locahost:9092
Create a rule CLMCMetrics.apache.cpu_load > 0.02
There's all sorts of notification possibilities
## Automatic test using JMeter and VLC command line
To be completed.
* Create a VM called `vlc-client` with vlc and jmeter installed
* Write a testcase using the JMeter GUI that streams the test video to a set of clients.
* The options for scaling the number of client threads needs to be explored
* The test conditions needs to be defined i.e. triggers at specific thresholds when cpu usage reaches a certain point
Issues, the Vagrantfile needs updating as the `vlc-client` needs to run two provisioning scripts adn the assumption is there's one provisioning script and the telegraf provisioning script. Looks like a hack is coming....if `vlc-client` then provision jmeter.
We then need programtically create rules using the kapacitor CLI to set the KPIs and get the alerts rather than all the manual set up