Integrating with TIBCO Spotfire
Spotfire can consume data from a Mashery Local database. To enable TIBCO Spotfire to consume logs, a separate service is required - the Mashery Local HTTP log consumer. The Mashery local HTTP log consumer takes the access logs and persists in a configured MySQL database. Supported logs include the Mashery Traffic Manager Access logs.
When you extract the TIB_mash-local_5.*_cf.tar.gz file, you will see a tml-spotfire folder which contains the artifacts needed for the TML-Spotfire integration.
Preparing MySql
To prepare MySQL:
- Create users (if needed).
- Create schema and required tables. Use the provided SQL file mlaccesslogschema.sql file to create required database and tables.
- Provide permissions on newly-created database and table for the users.
- Enable remote access to schema for created users.
- After running the SQL, a database named masherylocallogs and a table named tmlaccesslog will be created.
Preparing the Mashery local HTTP log consumer
Starting the Application
Starting Mashery Local HTTP log consumer on Windows
cd C:\Users\Administrator\tml-http-log-consumer-1.0\bin C:\Users\Administrator\tml-http-log-consumer-1.0\bin> run.batStarting Mashery Local HTTP log consumer on Linux
$ cd /home/User/tml-http-log-consumer-1.0/bin $ chmod +x run.sh $ ./run.sh
Testing the application
To test if the Mashery local HTTP log consumer is running correctly, run a curl command (or use a browser):
curl http://<hostname>:6080/logs Expected Output ---------------- Log consumer is available can consume : Access Logs
Configuring Mashery Local Log service to send logs to the Mashery local HTTP log consumer
- SSH into the tml-cm container/pod on your Mashery Local 5.x deployment.
- Prepare a config.json file with the following contents:
{ "td_agent_output_channelType" : "HTTP", "td_agent_out_http_URI" : "http://<hostname or ip address of Mashery local HTTP log consumer>:6080/logs/accesslog" }
- Name the files as /home/builder/config.json
- Use Cluster Manager to configure the log service to now send access logs to the Mashery local HTTP log consumer.
tml-cm
/home/builder $ clustermanager import config --componentType logservice --file /home/builder/config.json
Example output exampleUpdating the TMGC after the change Successfully updated the TMGC component c1057ef0-ab4e-459f-8413-0e5036c65b7c for components of type logservice Successfully imported configuration properties for the scope map[cluster:tml52clusterpune1 component:c1057ef0-ab4e-459f-8413-0e5036c65b7c zone:eastus] for components of type logservice
Copyright © Cloud Software Group, Inc. All rights reserved.