IED Logging & Monitoring (log metrics)

0
Hello,   I wonder if it is an intentional behaviour that logging & monitoring metrics data functionality for an app log (MetricsData -> EdgeApps -> Apps_Log) is sending only a subset of information that our app is writing into the standard console output.   I mean, when we restart our app and then check the records that were written by our app into the log that we can download from the IED UI (so-called file-based logging), there are several times more of our records than in the stream-based logging that we got via the Logging and Monitoring Service using the HTTP destination. File log:     Logging&monitoring   Best regards Petr
asked
4 answers
0

Hey Petr,

 

the Logging & Monitoring feature filters your Logs depending on the Log Level set in your Device Settings:

image.png

If your Log Level is set to anything higher than 'Trace' only Lines containing a Log Level descriptors equal or higher to the one selected will pass through the filter.

 

In the example provided by you the two Log lines contained the word 'info' and by that where going through, as your Log Level is probably set to 'Info'.

 

There are two options to remedy your issue:

  • Implement proper logging of the Level in each line, if this is a self developed application
  • Set your device log level to trace, with that no lines will be filtered out

I have also created a MR to the documentation so this behavior can be better understood.

answered
0

Hi,

 

I hope you are doing well.

 

I would like to know the following:

 

  1. IED you are using and its firmware version.
  2. Screenshots of the Logging and Monitoring configuration you have.

 

I tried replicating your case but couldn't achieve the same results. The logs from the application (container) I downloaded from the IED UI are the same logs I got from Logging and Monitoring.

 

This is my case:

 

On the left, you can see the logs of an app I downloaded directly from the IED UI by clicking on the "Download Logs" option. On the right, you can see the application logs I obtained using the Logging and Monitoring.

 

LOGS.png

 

On the Logging and Monitoring configuration, I used the "log" metric and published all the information to a PostgreSQL database (Data Destination), then exported the logs to an Excel file using Adminer.

 

If you want to learn more about logging and monitoring, how to set it up, the different metrics available, and how to configure data destinations, please refer to this link:

 

https://docs.eu1.edge.siemens.cloud/get_started_and_operate/industrial_edge_device/operation/settings/logging%26monitoring/stream_based/creating_metrics_configuration.html

 

I look forward to your response.

 

BR,

Rafael Curiel.

answered
0

Hi Rafael,

 

We use virtual IED, version ievd-1.16.1-1-a

 

I am enclosing the exported configuration. But there is pretty much nothing to configure — just metrics and destination. 

{
  "configurations": [
    {
      "title": "Intelligent logistics - internal data",
      "datasources": [
        {
          "appId": "de2fa9f02fc9463396e15ccd00c99965",
          "appTitle": "Intelligent logistics app"
        }
      ],
      "metrics": [
        {
          "name": "log",
          "instance": {
            "name": "log"
          }
        }
      ],
      "destinations": [
        {
          "id": "8be2b6b5-1328-4531-8f0a-9fbec57f907c",
          "name": "Server IT monitoring",
          "instance": {
            "format": "json",
            "header": [
              "XApiKey REMOVED",
              "XSecretKey REMOVED"
            ],
            "host": "REMOVED.siemens.net",
            "log_response_payload": true,
            "name": "http",
            "port": 443,
            "tls": "On",
            "uri": "/EDGEMONITORING/monitoring"
          }
        }
      ]
    },
    {
      REMOVED
    },
    {
      REMOVED
    },
    {
      REMOVED
    }
  ],
  "settings": {
    "flush": 5,
    "interval_sec": 180,
    "aws_access_key": "",
    "aws_secret_key": "",
    "prometheus_username": "",
    "prometheus_password": ""
  }
}

Best regards,

Petr

answered
0

Hello,

 

I hope you're doing well. I apologize for the delayed response.

 

However, this situation seems a bit strange to me. When I export the Logging and Monitoring configuration from my IED, the "metrics" section of the JSON file appears as follows:

 

metrics": [{ "name": "application.log", "instance": { "name": "application.log" } } ] 

 

As you can see, the metric name is "application.log," while in your case, it only shows "log". Please verify that your configuration matches what I’m showing in the attached image:

 

metricsssssssss.png

 

Additionally, please update the firmware version of your IEVD, as it is currently outdated.

 

Kindly apply the suggestions above and let me know if this resolves the issue.

 

Best regards,

Rafael Curiel.

answered