veyalla / ehm Goto Github PK
View Code? Open in Web Editor NEWEdge Hub Experimental metrics
License: MIT License
Edge Hub Experimental metrics
License: MIT License
I've setup IoT Edge and I cannot make metricscollector to work there. Container fails with following error:
standard_init_linux.go:211: exec user process caused "exec format error"
My suspicion is that docker image should be build against different architecture. Is that correct?
Board: Raspberry Pi 3 Model B Rev 1.2
OS: Raspbian GNU/Linux 9 (stretch)
Docker version 3.0.13+azure, build dd360c7c0de8d9132a3965db6a59d3ae74f43ba7
iotedge 1.0.9.3
container: veyalla/metricscollector:0.0.4-amd64
uname-m: armv7l
If the device twin is changed, means the scraped prometheus endpoints chance, e.g. because a new module is added, the MetricsCollector module should recognize that.
At the moment the MetricsCollector just evaluates it's device twin on start-up.
Provide a detailed set of steps to reproduce the bug.
Please note that the current behaviour basically mean you have to stop/start the MetricsCollector every time the list of prometheus endpoints changes. This is very inconvenient if you have no direct access to the edge and are forced to do two deployments via the Azure portal just to stop and start the MetricsCollector module in order to refresh the prometheus endpoint list.
Many thanks for providing the possibility to sync IoT edge metrics in some standard way (this was exactly the feature we have missed so far) to the cloud. It works as expected with the direct sync to log analytics - however I also want to try out the support of offline/disconnected scenarios and so I would also like to test the way to sync via IoTHub/D2C messages.
Since it was a pleasure to follow your guide to implement the log analytics connection, I would like to ask to also add some similar guidance for the D2C-way.
Thanks in advance!
Unhandled Exception: System.AggregateException: One or more errors occurred. (Invalid logs upload request schema version ) ---> System.InvalidOperationException: Invalid logs upload request schema version
at MetricsCollector.SchemaVersionHelper.CompareMajorVersion(Version expectedVersion, String actualVersionString, String context) in /app/SchemaVersionHelper.cs:line 11
at MetricsCollector.Program.GetConfiguration(ModuleClient ioTHubModuleClient) in /app/Program.cs:line 105
at MetricsCollector.Program.Init() in /app/Program.cs:line 52
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at MetricsCollector.Program.Main(String[] args) in /app/Program.cs:line 22
Create Container Options set :
{
"properties.desired": {
"schemaVersion": "1.0",
"scrapeFrequencySecs": 300,
"metricsFormat": "Json",
"syncTarget": "AzureLogAnalytics",
"endpoints": {
"edgeHub": "http://edgeHub:9600/metrics"
}
}
}
Any advise?
The link in:
https://labs.iotedge.dev/codelabs/monitor-iotedge/
says:
"1. Thank you
This PoC lab's time has ended and is no longer maintained. To register your interest in the official preview of IoT Edge remote monitoring, sign up @ https://aka.ms/edgemon-intake.
See you there!"
Any plan to make it available again? it was a very good lab.
In order to evaluate the use of Edge Hub Metrics for our project, I tried to set up IoT Edge devices on VMs for Linux (with Linux Containers) and Windows (with Windows Containers). While the Linux version worked just fine, I keep having problems with the windows version. My setup is:
{ "HostConfig": { "PortBindings": { "443/tcp": [ { "HostPort": "443" } ], "5671/tcp": [ { "HostPort": "5671" } ], "8883/tcp": [ { "HostPort": "8883" } ] } }, "User": "ContainerAdministrator", "ExposedPorts": { "9600/tcp": {}, "5671/tcp": {}, "8883/tcp": {} } }
{ "schemaVersion": "1.0", "scrapeFrequencySecs": 10, "metricsFormat": "Json", "syncTarget": "IoTHub", "endpoints": { "edgeAgent": "http://edgeAgent:9600/metrics", "edgeHub": "http://edgeHub:9600/metrics" } }
While the collector seems to be able to retrieve the metrics from the edgeAgent and edgeHub, it fails to send them to IoT Hub. I tried around if it might be some connectivity issue from my VM, but for example the simulated temperature sensor module succeeds to send telemetry to IoT Hub. The error message that I get is:
Scraping endpoint http://edgeAgent:9600/metrics
Got metrics from endpoint [http://edgeAgent:9600/metrics, http://172.23.15.202:9600/metrics]
Scraping endpoint http://edgeHub:9600/metrics
Got metrics from endpoint [http://edgeHub:9600/metrics, http://172.23.13.128:9600/metrics]
Error scraping and syncing metrics - System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Microsoft.Azure.Amqp.AmqpMessage.get_DataBody()
at Microsoft.Azure.Devices.Client.Transport.AmqpIoT.AmqpIoTSendingLink.SendMessagesAsync(IEnumerable1 messages, TimeSpan timeout) at Microsoft.Azure.Devices.Client.Transport.AmqpIoT.AmqpUnit.SendMessagesAsync(IEnumerable
1 messages, TimeSpan timeout)
at Microsoft.Azure.Devices.Client.Transport.AmqpIoT.AmqpUnit.SendEventsAsync(IEnumerable1 messages, TimeSpan timeout) at Microsoft.Azure.Devices.Client.Transport.Amqp.AmqpTransportHandler.SendEventAsync(IEnumerable
1 messages, CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler.<>c__DisplayClass22_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler.ExecuteWithErrorHandlingAsync[T](Func1 asyncOperation) at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.<>c__DisplayClass15_0.<<SendEventAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.SendEventAsync(IEnumerable
1 messages, CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.InternalClient.SendEventBatchAsync(IEnumerable`1 messages)
at MetricsCollector.IoTHubMetricsSync.ScrapeAndSync() in C:\app\IoTHubMetricsSync.cs:line 30
Any ideas? I know that the metrics collector is no officially supported module - we didnt plan to use it in production, just for evaluating the edge hub metrics features for our project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.