Troubleshoot applications
You can use logging and monitoring to troubleshoot your Edge Intelligence applications.
The centralized logging capability gives insight into the state of the Edge Intelligence components.
The current version of Edge Intelligence supports CLI. You can also use a text editor, or GUI tools such as Kibana (when Elasticsearch is installed) for logging. Deploy GUI tools as custom applications in the
tab of the Edge Manager.Verify that the Edge Intelligence services are working by going to the Device tab in Edge Manager. Select the core device and open the Device Details page.
All the listed services should be running.
When you have Elasticsearch installed, you can use the curl command to query the service by the port. The unified log (UL) is exposed via port 30920 on the cluster. It is protected by the user name and the password that is set during installation. For this example, the user name is ‘admin’ and the password is ‘Admin123’:
# curl -k -u admin:Admin123 'https://<IP address of host>:30920/_cat/indices?v' health status index uuid pri rep docs.count docs.deleted store.size pri.store.size green open logstash-2018.10.26 CmcAfaevTk2Hv2L_VGa5sA 5 1 49004 0 46.1mb 20.9mb
You can further query the logs for errors or other information. Basic queries can be done using query string parameters in the URL. For example, the following searches for the text error
in any field in any document and returns at most 5 results. Basic queries use the q
query string parameter that filters on specific fields, (for example, fieldname:value
), wildcards (abc*
), and others. Other options such as size, from
, and so on, can further customize the query and its results. For more information, see the Elasticsearch URI request documentation: http://www.elasticsearch.org/guide/reference/api/search/uri-request.html
# curl -k -u admin:Admin123 'https://<IP address of host>:30920/_search?q=error&size=5&pretty' ... { "_index" : "logstash-2018.10.26", "_type" : "flb_type", "_id" : "Qd3CsWYB7jqeXHKt-Zm9", "_score" : 5.9804873, "_source" : { "es_time" : "2018-10-26T19:03:33.102Z", "log" : "2018-10-26 19:03:33.102 [INFO][93] route_table.go 403: Failed to get interface; it's down/gone. error=Link not found ifaceName= \"cali329675177da\" ipVersion=0x4\n", "stream" : "stdout", "time" : "2018-10-26T19:03:33.102633914Z" } ...