This Python script can be run locally or within the AppDynamics Synthetics product. It connects to your chosen URL and times the response time and records the response code. This information is then stored in a custom analytics schema inside AppDynamics analytics.
- A python3 installation and AppDynamics Synthetics.
- Set appropriate environment variables. Edit the values in env-var.sh to the values for the controller you'd like to send the data to.
- Run the following command to set the environment variables
$ source env-var.sh
- Edit the url variable at the start of the script to the URL that you would like to test.
- Setup custom analytics schema by running the following command.
python3 endpoint.py createSchema <schema-name>
- Run the script to perform the timed request.
python3 endpoint.py runTest1 <schema-name>
- The results of the test will be recorded in the custom analytics schema created in step 4.
When running within AppDynamics synthetics the results of the test will not appear in the synthetics part of the product. The results will be added to the synthetics schema created when running locally.