Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Azure IoT Edge integration #7465

Merged
merged 65 commits into from
Oct 22, 2020
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
96fad1a
Add skeleton
Aug 28, 2020
9fef3f0
Working Docker setup for 1.0.9
Aug 31, 2020
ce9bc5c
Attempt 1.0.10-rc2 setup
Aug 31, 2020
5f25b45
Finalize RC2 dev setup
Sep 1, 2020
6fd6fc2
Fix double-endpoint setup, implement scraping of Prometheus endpoints
Sep 1, 2020
1685edd
Update CI config
Sep 2, 2020
a535b5b
Add config class, add failing integration test
Sep 2, 2020
313fc8f
Successfully collect and test metrics, improve env up/down robustness
Sep 2, 2020
28d33a2
Make tests pass
Sep 2, 2020
03c0fbf
Use local mock server for CI tests
Sep 4, 2020
f8629f1
Add Edge Agent metrics
Sep 4, 2020
5d0c6b0
Update codecov config
Sep 7, 2020
b302b8b
Tweak exclude_labels
Sep 7, 2020
72cb919
Fix invalid manifest
Sep 7, 2020
18ca0ec
Add edgeHub metrics
Sep 7, 2020
b2213c6
Document mock server metrics generation
Sep 7, 2020
6423b81
Fix Python 2 tests compatibility
Sep 7, 2020
c94f10b
Assert E2E tags
Sep 7, 2020
1574b3a
Skip E2E tests if IOT_EDGE_CONNSTR is missing
Sep 7, 2020
2832868
Use Windows-compatible mock server setup
Sep 7, 2020
640032a
Add security daemon health service check
Sep 7, 2020
0fd2abe
Simplify prometheus url config, add config tests
Sep 7, 2020
e35340c
Fix style, fix Windows test compat
Sep 7, 2020
47e9d74
Verify service check in e2e
Sep 7, 2020
d9b5234
Fix check class name case
Sep 7, 2020
8f24b1d
Add config spec
Sep 8, 2020
b15cddf
Add logs to config spec and test env
Sep 8, 2020
08508b9
Use auto-discovery for log collection
Sep 8, 2020
cc1550c
Merge branch 'master' into fm/iot_edge
Sep 9, 2020
777a102
Enable log collection via Docker labels
Sep 9, 2020
ce86835
Merge branch 'master' into fm/iot_edge
Sep 10, 2020
f01f898
Set required properties in config spec
Sep 10, 2020
39d3735
Merge branch 'master' into fm/iot_edge
Sep 11, 2020
b7ccdbb
Reorganize config options order
Sep 11, 2020
6b625a7
Loosen wait conditions
Sep 14, 2020
bf95787
Merge branch 'master' into fm/iot_edge
Sep 16, 2020
34a4ffd
Merge branch 'master' into fm/iot_edge
Sep 17, 2020
8bbfddf
Merge branch 'master' into fm/iot_edge
Sep 18, 2020
e43fef6
Merge branch 'master' into fm/iot_edge
Sep 23, 2020
9e268a3
Update namespace to azure.iot_edge
Sep 23, 2020
c64698b
Merge branch 'master' into fm/iot_edge
Sep 25, 2020
3504ee3
Add version metadata collection
Sep 25, 2020
f80e4ec
Update manifest.json
Sep 25, 2020
6041ead
Check types
Sep 25, 2020
37ace98
Write up metadata.csv
Sep 25, 2020
591e5b2
Merge branch 'master' into fm/iot_edge
Sep 28, 2020
846bcac
Fill in service_checks.json
Sep 28, 2020
13d0000
Add TLS support to E2E environment
Sep 28, 2020
4aa5660
Add code comment about single-instance and composition approaches
Sep 28, 2020
c727097
Drop note about setting certs in config.yaml
Sep 28, 2020
60fca78
Merge branch 'master' into fm/iot_edge
Sep 29, 2020
33cccaf
Write up README
Sep 29, 2020
ec868e8
Lingo: security daemon -> security manager
Sep 29, 2020
7b081e4
Add recommended monitors
Sep 29, 2020
1f95257
Merge branch 'master' into fm/iot_edge
Sep 30, 2020
04b990a
Apply no-brainer suggestions
florimondmanca Oct 1, 2020
a1d86cd
Update version metadata transformer
Oct 2, 2020
38e8b19
Address feedback
Oct 2, 2020
dbb1370
Move instance config to Edge Agent labels
Oct 2, 2020
a25a15a
Merge branch 'master' into fm/iot_edge
Oct 9, 2020
0de144a
Merge branch 'master' into fm/iot_edge
Oct 13, 2020
ab0b18f
Apply suggestions from docs review
florimondmanca Oct 13, 2020
042ab4e
Merge branch 'master' into fm/iot_edge
Oct 20, 2020
926c566
Fix type of renotify_interval in monitors json
Oct 20, 2020
145a931
Merge branch 'master' into fm/iot_edge
Oct 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Write up metadata.csv
  • Loading branch information
Florimond Manca committed Sep 25, 2020
commit 37ace98d2cd4f5a6dea3d6d7a88088aeed7da50e
59 changes: 59 additions & 0 deletions azure_iot_edge/metadata.csv
Original file line number Diff line number Diff line change
@@ -1 +1,60 @@
metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name
azure.iot_edge.edge_hub.gettwin_total,count,,,,Total number of GetTwin calls.,0,azure_iot_edge,
azure.iot_edge.edge_hub.messages_received_total,count,,,,Total number of messages received from clients.,0,azure_iot_edge,
azure.iot_edge.edge_hub.messages_sent_total,count,,,,Total number of messages sent to clients of upstream.,0,azure_iot_edge,
azure.iot_edge.edge_hub.reported_properties_total,count,,,,Total reported property updates calls.,0,azure_iot_edge,
azure.iot_edge.edge_hub.message_size_bytes.count,gauge,,,,Count of message size from clients.,0,azure_iot_edge,
azure.iot_edge.edge_hub.message_size_bytes.sum,gauge,,,,Sum of message size from clients.,0,azure_iot_edge,
azure.iot_edge.edge_hub.message_size_bytes.quantile,gauge,,,,Quantile of message size from clients.,0,azure_iot_edge,
azure.iot_edge.edge_hub.gettwin_duration_seconds.count,gauge,,,,Count of time taken for get twin operations.,0,azure_iot_edge,
azure.iot_edge.edge_hub.gettwin_duration_seconds.sum,gauge,,,,Sum of time taken for get twin operations.,0,azure_iot_edge,
azure.iot_edge.edge_hub.gettwin_duration_seconds.quantile,gauge,,,,Quantile of time taken for get twin operations.,0,azure_iot_edge,
azure.iot_edge.edge_hub.message_send_duration_seconds.count,gauge,,,,Count of time taken to send a message.,0,azure_iot_edge,
azure.iot_edge.edge_hub.message_send_duration_seconds.sum,gauge,,,,Sum of time taken to send a message.,0,azure_iot_edge,
azure.iot_edge.edge_hub.message_send_duration_seconds.quantile,gauge,,,,Quantile of time taken to send a message.,0,azure_iot_edge,
azure.iot_edge.edge_hub.message_process_duration_seconds.count,gauge,,,,Count of time taken to process a message from the queue.,0,azure_iot_edge,
azure.iot_edge.edge_hub.message_process_duration_seconds.sum,gauge,,,,Sum of time taken to process a message from the queue.,0,azure_iot_edge,
azure.iot_edge.edge_hub.message_process_duration_seconds.quantile,gauge,,,,Quantile of time taken to process a message from the queue.,0,azure_iot_edge,
azure.iot_edge.edge_hub.reported_properties_update_duration_seconds.count,gauge,,,,Count of time taken to update reported properties.,0,azure_iot_edge,
azure.iot_edge.edge_hub.reported_properties_update_duration_seconds.sum,gauge,,,,Sum of time taken to update reported properties.,0,azure_iot_edge,
azure.iot_edge.edge_hub.reported_properties_update_duration_seconds.quantile,gauge,,,,Quantile of time taken to update reported properties.,0,azure_iot_edge,
azure.iot_edge.edge_hub.direct_method_duration_seconds.count,gauge,,,,Count of time taken to resolve a direct message.,0,azure_iot_edge,
azure.iot_edge.edge_hub.direct_method_duration_seconds.sum,gauge,,,,Sum of time taken to resolve a direct message.,0,azure_iot_edge,
azure.iot_edge.edge_hub.direct_method_duration_seconds.quantile,gauge,,,,Quantile of time taken to resolve a direct message.,0,azure_iot_edge,
azure.iot_edge.edge_hub.direct_methods_total,count,,,,Total number of direct messages sent.,0,azure_iot_edge,
azure.iot_edge.edge_hub.queue_length,gauge,,,,"Current length of Edge Hub's queue for a given `priority`.",0,azure_iot_edge,
azure.iot_edge.edge_hub.messages_dropped_total,count,,,,"Total number of messages removed because of `reason`.",0,azure_iot_edge,
azure.iot_edge.edge_hub.messages_unack_total,count,,,,Total number of messages unack because of storage failure.,0,azure_iot_edge,
azure.iot_edge.edge_hub.offline_count_total,count,,,,Total number of times Edge Hub went offline.,0,azure_iot_edge,
azure.iot_edge.edge_hub.offline_duration_seconds.count,gauge,,,,Count of time Edge Hub was offline.,0,azure_iot_edge,
azure.iot_edge.edge_hub.offline_duration_seconds.sum,gauge,,,,Sum of time Edge Hub was offline.,0,azure_iot_edge,
azure.iot_edge.edge_hub.offline_duration_seconds.quantile,gauge,,,,Quantile of time Edge Hub was offline.,0,azure_iot_edge,
azure.iot_edge.edge_hub.operation_retry_total,count,,,,Total number of times Edge operations were retried.,0,azure_iot_edge,
azure.iot_edge.edge_hub.client_connect_failed_total,count,,,,Total number of times clients failed to connect to Edge Hub.,0,azure_iot_edge,
azure.iot_edge.edge_agent.total_time_running_correctly_seconds,gauge,,,,"The amount of time the module `module_name` was specified in the deployment and was in the running state.",0,azure_iot_edge,
azure.iot_edge.edge_agent.total_time_expected_running_seconds,gauge,,,,"The amount of time the module `module_name` was specified in the deployment.",0,azure_iot_edge,
azure.iot_edge.edge_agent.module_start_total,count,,,,"Number of times the Edge Agent asked Docker to start the module `module_name`.",0,azure_iot_edge,
azure.iot_edge.edge_agent.module_stop_total,count,,,,"Number of times the Edge Agent asked Docker to stop the module `module_name`.",0,azure_iot_edge,
azure.iot_edge.edge_agent.command_latency_seconds.count,gauge,,,,"Count of how long it took for Docker to execute the given `command`. Possible commands are: create, update, remove, start, stop, restart.",0,azure_iot_edge,
azure.iot_edge.edge_agent.command_latency_seconds.sum,gauge,,,,"Sum of how long it took for Docker to execute the given `command`. Possible commands are: create, update, remove, start, stop, restart.",0,azure_iot_edge,
azure.iot_edge.edge_agent.command_latency_seconds.quantile,gauge,,,,"Quantile of how long it took for Docker to execute the given `command`. Possible commands are: create, update, remove, start, stop, restart.",0,azure_iot_edge,
azure.iot_edge.edge_agent.iothub_syncs_total,count,,,,"Total number of times the Edge Agent attempted to sync its twin with IoT Hub, both successful and unsuccessful. Includes both Edge Agent requesting a twin, and IoT Hub notifying of a twin update.",0,azure_iot_edge,
azure.iot_edge.edge_agent.unsuccessful_iothub_syncs_total,count,,,,Total number of times the Edge Agent failed to sync its twin with IoT Hub.,0,azure_iot_edge,
azure.iot_edge.edge_agent.deployment_time_seconds.count,gauge,,,,Count of amount of time it took to complete a new deployment after receiving a change.,0,azure_iot_edge,
azure.iot_edge.edge_agent.deployment_time_seconds.sum,gauge,,,,Sum of amount of time it took to complete a new deployment after receiving a change.,0,azure_iot_edge,
azure.iot_edge.edge_agent.deployment_time_seconds.quantile,gauge,,,,Quantile of amount of time it took to complete a new deployment after receiving a change.,0,azure_iot_edge,
azure.iot_edge.edge_agent.direct_method_invocations_count,count,,,,"Total number of times a built-in Edge Agent direct method is called, such as Ping or Restart.",0,azure_iot_edge,
azure.iot_edge.edge_agent.host_uptime_seconds,gauge,,,,"How long the host has been running.",0,azure_iot_edge,
azure.iot_edge.edge_agent.iotedged_uptime_seconds,gauge,,,,"How long `iotedged` has been running.",0,azure_iot_edge,
azure.iot_edge.edge_agent.available_disk_space_bytes,gauge,,,,"Amount of space left on the disk `disk_name.",0,azure_iot_edge,
azure.iot_edge.edge_agent.total_disk_space_bytes,gauge,,,,"Size of the disk `disk_name.",0,azure_iot_edge,
azure.iot_edge.edge_agent.used_memory_bytes,gauge,,,,"Amount of RAM used by all processes in module `module_name`.",0,azure_iot_edge,
azure.iot_edge.edge_agent.total_memory_bytes,gauge,,,,"Total amount of RAM available to module `module_name`.",0,azure_iot_edge,
azure.iot_edge.edge_agent.used_cpu_percent.count,gauge,,,,"Count of percent of CPU used by all processes in module `module_name`.",0,azure_iot_edge,
azure.iot_edge.edge_agent.used_cpu_percent.sum,gauge,,,,"Sum of percent of CPU used by all processes in module `module_name`.",0,azure_iot_edge,
azure.iot_edge.edge_agent.used_cpu_percent.quantile,gauge,,,,"Quantile of percent of CPU used by all processes in module `module_name`.",0,azure_iot_edge,
azure.iot_edge.edge_agent.created_pids_total,gauge,,,,"Total number of processes the module `module_name` has created.",0,azure_iot_edge,
azure.iot_edge.edge_agent.total_network_in_bytes,gauge,,,,"Total amount of bytes received from the network by module `module_name`.",0,azure_iot_edge,
azure.iot_edge.edge_agent.total_network_out_bytes,gauge,,,,"Total amount of bytes sent to the network by module `module_name`.",0,azure_iot_edge,
azure.iot_edge.edge_agent.total_disk_read_bytes,gauge,,,,"Total amount of bytes read from the disk by module `module_name`.",0,azure_iot_edge,
azure.iot_edge.edge_agent.total_disk_write_bytes,gauge,,,,"Total amount of bytes written to the disk by module `module_name`.",0,azure_iot_edge,
5 changes: 2 additions & 3 deletions azure_iot_edge/tests/test_check.py
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
from datadog_checks.base.stubs.aggregator import AggregatorStub
from datadog_checks.base.stubs.datadog_agent import DatadogAgentStub
from datadog_checks.base.utils.platform import Platform
from datadog_checks.dev.utils import get_metadata_metrics

from . import common

@@ -54,9 +55,7 @@ def test_check(aggregator, mock_instance):
)

aggregator.assert_all_metrics_covered()

# TODO
# aggregator.assert_metrics_using_metadata(get_metadata_metrics())
aggregator.assert_metrics_using_metadata(get_metadata_metrics())


@pytest.mark.usefixtures("mock_server")