Coralogix
Coralogix is a machine-learning-powered logging platform built for companies performing CI/CD at scale.
To integrate TestFairy with Coralogix and automatically push all the logs collected from your mobile devices to your Coralogix account, do the following:
-
Install the TestFairy fetch sessions logs client on your server by running the following command:
npm install -g --link git+https://github.com/testfairy/testfairy-fetch-sessions.git -
Create a cron job that runs this command every 15 minutes.
testfairy-fetch-sessions --endpoint "your_subdomain.testfairy.com" --user "john@example.com" --api-key "YOUR_API_KEY" --project-id=1000 --logs --jsonMake sure to replace the following params:
- Replace
your_subdomain.testfairy.comwith your server address. - Replace
john@example.comwith your admin username - Replace
YOUR_API_KEYwith your API KEY (found under User preferences > Upload API key) - Replace
1000with your project ID - (Optional) Add
--jsonto have a log line as a json with all session attributes. - (Optional): add
--all-timeflag to get logs from all times. If not used, the tool only fetches logs from the last 24 hours. Only use this option if this is your first debugging of the service. Logs older than 24 hours are usually a waste of good disk space. - (Optional): if your logs are encrypted with RSA public key, use
--rsa-private-keywith your private key for decryption.
- Replace
-
Install Coralogix shipper:
- Download the preconfigured
[fluentd.conf](/img/testfairy/integrations/fluentd.conf) - Edit
fluentd.conf, and updateCORALOGIX_PRIVATEKEYandCORALOGIX_APPNAME
- Download the preconfigured
-
Run FluentD:
docker run -d -v `pwd`/fluentd.conf:/fluentd/etc/fluent.conf -v `pwd`:/opt coralogixrepo/fluentd-coralogix-image:latestFluentd loops endlessly, looking for new logs files on disk. Ensure you keep this docker container running while the cron job fetches sessions from TestFairy now and then.
You have integrated TestFairy with Coralogix; you can now analyze and monitor mobile app logs in production.