Skip to content

Conversation

@huntergregory
Copy link
Contributor

This PR adds base Prometheus functionality for measuring and emitting custom metrics (time series) in NPM. There are 6 metrics included currently, and others can be added easily. The current metrics are:

  • number of network policies on the host
  • execution time for adding a network policy
  • number of IP Table rules on the host
  • execution time for adding an IP Table rule to a chain on the host
  • number of IP Sets on the host
  • execution time for adding an IP Set to the host

Metrics are useful for troubleshooting network issues/configuration and are important to monitor (e.g. number of policies should remain low enough).

NPM Prometheus Metrics

Hunter Gregory added 24 commits June 16, 2020 15:59
…this new count value are done by passing the metric itself as a param instead of a string
… code, and updated calls to use new form for getting metric values
…and passing in the wrong param type for testing
…ld random metric flux testing function over from ipsm_test
@matmerr
Copy link
Member

matmerr commented Jun 25, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov
Copy link

codecov bot commented Jun 25, 2020

Codecov Report

Merging #590 into master will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #590      +/-   ##
==========================================
+ Coverage   37.30%   37.44%   +0.14%     
==========================================
  Files          47       47              
  Lines        5203     5215      +12     
==========================================
+ Hits         1941     1953      +12     
  Misses       3000     3000              
  Partials      262      262              

@matmerr matmerr added enhancement npm Related to NPM. labels Jun 25, 2020
@huntergregory
Copy link
Contributor Author

Noting here that the PR passed the local environment scale test (TH test). No errors and approximately the same memory usage in azure-npm pod (14 MiB without Prometheus and 18 MiB with Prometheus).

@huntergregory
Copy link
Contributor Author

Letting @vishiy view the PR

@huntergregory huntergregory merged commit 88ea3c2 into Azure:master Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement npm Related to NPM.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants