TCC Metrics Retrieval Development Process
The purpose of this document is to explain how a software engineer can build an application to retrieve metrics data from TCC. This process will need to be completed by a software engineer as software development will be required.
Requirements
The following information is necessary to complete these steps.
- Knowledge of the IP address of the applicable TCC server.
- Knowledge of the port the TCC service is running on.
- This can be found by navigating to the configuration file on the TCC server and looking for the value in the “app.port=” field. It is usually configured for port 8080.
- The configuration file for Linux TCC builds is located at /opt/tenfold/tcc/config.properties
- The configuration file for Windows TCC builds is located at C:\ProgramData\Tenfold\TCC\config.properties
- This can be found by navigating to the configuration file on the TCC server and looking for the value in the “app.port=” field. It is usually configured for port 8080.
- Network access from the TCC server to the computer attempting to interact with the server.
Process
You will need to send a GET request to http://<IP address>:<app.port value>/api/metrics and it will return a metrics JSON that will look similar to the example below. You will then need to parse the data for the metrics that you want to monitor and their values.
For example, if you’d like to monitor for a phone system disconnection, you would send a GET request to http://127.0.0.1:8080/api/metrics and you would parse this node for a value of 1 for connection or 0 for disconnection:
- Example Node
javascript:
{
"name" : "tcc.phone.status",
"value" : "1",
"type" : "gauge",
"timestamp" : "1666695433428"
}
Example JSON
javascript:
{
"heartbeats" : [ {
"organizationId" : "5fca0a2dbb667c0006xxxxxx",
"hostname" : "example",
"os" : "Windows 10",
"ip" : "10.0.0.2",
"pbxType" : "AVAYA_AES",
"guid" : "26f66b73-47c6-3d05-a977-b1bb9d3d21b0",
"haState" : "ACTIVE",
"version" : "",
"proxyserver" : "",
"metrics" : [ {
"name" : "tcc.host.cpu.cores",
"value" : "8",
"type" : "gauge",
"timestamp" : "1666695433239" }, {
"name" : "tcc.host.cpu.utilization",
"value" : "7.49",
"type" : "gauge",
"timestamp" : "1666695433242"
}, {
"name" : "tcc.host.disk.available",
"value" : "431.5",
"type" : "gauge",
"timestamp" : "1666695433242"
}, {
"name" : "tcc.host.disk.utilization",
"value" : "73.42",
"type" : "gauge",
"timestamp" : "1666695433242"
}, {
"name" : "tcc.host.memory.available",
"value" : "15.87",
"type" : "gauge",
"timestamp" : "1666695433427"
}, {
"name" : "tcc.host.memory.utilization",
"value" : "68.22",
"type" : "gauge",
"timestamp" : "1666695433427"
}, {
"name" : "tcc.jvm.memory.available",
"value" : "3.53",
"type" : "gauge",
"timestamp" : "1666695433427"
}, {
"name" : "tcc.jvm.memory.utilization",
"value" : "6.62",
"type" : "gauge",
"timestamp" : "1666695433427"
}, {
"name" : "tcc.phone.status",
"value" : "1",
"type" : "gauge",
"timestamp" : "1666695433428"
}, {
"name" : "tcc.phone.disconnected",
"value" : "0",
"type" : "gauge",
"timestamp" : "1666695433428"
}, {
"name" : "tcc.phone.ivr.status",
"value" : "1",
"type" : "gauge",
"timestamp" : "1666695433428"
}, {
"name" : "tcc.phone.ivr.disconnected",
"value" : "0",
"type" : "gauge",
"timestamp" : "1666695433428"
}, {
"name" : "tcc.app.uptime",
"value" : "26",
"type" : "gauge",
"timestamp" : "1666695433428"
}, {
"name" : "tcc.app.events.channel",
"value" : "1",
"type" : "gauge",
"timestamp" : "1666695433428"
}, {
"name" : "tcc.app.events.disconnected",
"value" : "0",
"type" : "gauge",
"timestamp" : "1666695433428"
}, {
"name" : "tcc.app.events.sent",
"value" : "1",
"type" : "count",
"interval" : "0.0"
}, {
"name" : "tcc.app.events.latency.max",
"value" : "854.12",
"type" : "gauge",
"timestamp" : "1666695433429"
}, {
"name" : "tcc.app.events.latency.avg",
"value" : "854.12",
"type" : "gauge",
"timestamp" : "1666695433429"
}, {
"name" : "tcc.app.events.latency.latest",
"value" : "853",
"type" : "gauge",
"timestamp" : "1666695433429"
}, {
"name" : "tcc.app.events.publisher.threads",
"value" : "32",
"type" : "gauge",
"timestamp" : "1666695433429"
}, {
"name" : "tcc.app.queue.size",
"value" : "0",
"type" : "gauge",
"timestamp" : "1666695433429"
}, {
"name" : "tcc.app.queue.wait.avg",
"value" : "998",
"type" : "gauge",
"timestamp" : "1666695433430"
}, {
"name" : "tcc.app.commands.channel",
"value" : "1",
"type" : "gauge",
"timestamp" : "1666695433430"
}, {
"name" : "tcc.app.commands.disconnected",
"value" : "0",
"type" : "gauge",
"timestamp" : "1666695433430"
}, {
"name" : "tcc.app.commands.success",
"value" : "0",
"type" : "count",
"interval" : "0.0"
}, {
"name" : "tcc.app.commands.fail",
"value" : "0",
"type" : "count",
"interval" : "0.0"
}, {
"name" : "tcc.users.active",
"value" : "0",
"type" : "count",
"interval" : "0.0"
}, {
"name" : "tcc.users.logins.success",
"value" : "0",
"type" : "count",
"interval" : "0.0"
}, {
"name" : "tcc.users.logins.fail",
"value" : "0",
"type" : "count",
"interval" : "0.0"
}, {
"name" : "tcc.extension.monitored",
"value" : "0",
"type" : "gauge",
"timestamp" : "1666695433441"
}, {
"name" : "tcc.calls.processed",
"value" : "0",
"type" : "count",
"interval" : "0.0"
} ],
"events" : [ {
"name" : "tcc.start",
"message" : "",
"type" : "info",
"timestamp" : "1666695413047"
}, {
"name" : "pbx.connection.status",
"message" : "Skill 29908 is monitored",
"type" : "info",
"timestamp" : "1666695416387"
}, {
"name" : "cloud.command.channel",
"message" : "",
"type" : "info",
"timestamp" : "1666695417469"
}, {
"name" : "cloud.event.channel",
"message" : "",
"type" : "info",
"timestamp" : "1666695433428"
} ]
} ]
}
Missing Something?
Check out our Developer Center for more in-depth documentation. Please share your documentation feedback with us using the feedback button. We'd be happy to hear from you.