Skip to content

Commit

Permalink
APIGOV-29054 - Using Anypoint Monitoring Archive API for API metrics (#…
Browse files Browse the repository at this point in the history
…279)

* APIGOV-29054 - Using Anypoint Monitoring Archive API to capture API metrics
- Remove deprecated Anypoint Analytics API calls to fetch traffic events

* APIGOV-29054 - updates

* APIGOV-29054 - use time from metric report for metric event

* APIGOV-29054 - Updates to query monitoring datasource
- added config to optionally disable monitoring archive API to fetch metrics and use monitoring query to fetch API metrics

* APIGOV-29054 - update

* APIGOV-29054 - update

* APIGOV-29054 - fix for publishing metric batch

* APIGOV-29054 - fixes

* APIGOV-29054 - fix to use current time if instance create time is more than 24h

* APIGOV-29054 - update
  • Loading branch information
vivekschauhan authored Oct 25, 2024
1 parent 3be99d6 commit 7453084
Show file tree
Hide file tree
Showing 36 changed files with 1,039 additions and 1,023 deletions.
2 changes: 1 addition & 1 deletion README_discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Along with all [common agent variables](https://docs.axway.com/bundle/amplify-ce
| MULESOFT_DISCOVERORIGINALRAML | mulesoft.discoverOriginalRAML | Set to true if the agent should discover the Assets that were created in RAML as RAML | _false_ |
| MULESOFT_ENVIRONMENT | mulesoft.environment | The Mulesoft Anypoint Exchange the agent connects to, e.g. Sandbox. | |
| MULESOFT_ORGNAME | mulesoft.orgName | The Mulesoft Anypoint Business Unit the agent connects to | |
| MULESOFT_POLLINTERVAL | mulesoft.pollInterval | The frequency in which Mulesoft API Manager is polled for new endpoints. | _30s_ |
| MULESOFT_POLLINTERVAL | mulesoft.pollInterval | The frequency in which Mulesoft API Manager is polled for new endpoints. | _60s_ |
| MULESOFT_PROXYURL | mulesoft.proxyUrl | The url for the proxy for API Manager (e.g. <http://username:password@hostname:port>). If empty, no proxy is defined. | Internally, this value defaults to empty |
| MULESOFT_SSL_CIPHERSUITES | mulesoft.ssl.cipherSuites | An array of strings. It is a list of supported cipher suites for TLS versions up to TLS 1.2. If CipherSuites is nil, a default list of secure cipher suites is used, with a preference order based on hardware performance. | [See](https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connected_agent_common_reference/agent_security/index.html) for default cipher suite setting |
| MULESOFT_SSL_INSECURESKIPVERIFY | mulesoft.ssl.insecureSkipVerify | InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. If InsecureSkipVerify is true, TLS accepts any certificate presented by the server and any host name in that certificate. In this mode, TLS is susceptible to man-in-the-middle attacks. | Internally defaulted to false |
Expand Down
2 changes: 1 addition & 1 deletion README_traceability.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Along with all [common agent variables](https://docs.axway.com/bundle/amplify-ce
| MULESOFT_CACHEPATH | mulesoft.cachePath | Path entry to store stateful cache between agent invocations | _/tmp_ |
| MULESOFT_ENVIRONMENT | mulesoft.environment | The MuleSoft Anypoint Exchange the agent connects to, e.g. Sandbox. | |
| MULESOFT_ORGNAME | mulesoft.orgName | The MuleSoft Anypoint Business Unit the agent connects to | |
| MULESOFT_POLLINTERVAL | mulesoft.pollInterval | The frequency in which MuleSoft API Manager is polled for new endpoints. | _30s_ |
| MULESOFT_POLLINTERVAL | mulesoft.pollInterval | The frequency in which MuleSoft API Manager is polled for new endpoints. | _60s_ |
| MULESOFT_PROXYURL | mulesoft.proxyUrl | The url for the proxy for API Manager (e.g. <http://username:password@hostname:port>). If empty, no proxy is defined. | Internally, this value defaults to empty |
| MULESOFT_SSL_INSECURESKIPVERIFY | mulesoft.ssl.insecureSkipVerify | InsecureSkipVerify controls whether a client verifies the server's certificate chain and host name. If InsecureSkipVerify is true, TLS accepts any certificate presented by the server and any host name in that certificate. In this mode, TLS is susceptible to man-in-the-middle attacks. | Internally defaulted to false |
| MULESOFT_SSL_CIPHERSUITES | mulesoft.ssl.cipherSuites | An array of strings. It is a list of supported cipher suites for TLS versions up to TLS 1.2. If CipherSuites is nil, a default list of secure cipher suites is used, with a preference order based on hardware performance. | [See](https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/connected_agent_common_reference/agent_security/index.html) for default cipher suite setting |
Expand Down
45 changes: 18 additions & 27 deletions build/mulesoft_discovery_agent.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
central:
agentName: ${CENTRAL_AGENTNAME:""}
organizationID: "<Amplify_ORG_ID>"
environment: <Amplify_CENTRAL_ENVIRONMENT_NAME>
mode: publishToEnvironmentAndCatalog
url: https://apicentral.axway.com
platformURL: https://platform.axway.com
pollInterval: 5s
grpc:
enabled: false
organizationID:
team:
environment:
auth:
clientID: <Amplify_CENTRAL_DOSA_CLIENT_ID>
privateKey: <Amplify_CENTRAL_DOSA_PRIVATE_KEY_PATH>
publicKey: <Amplify_CENTRAL_DOSA_PUBLIC_KEY_PATH>
realm: Broker
timeout: 30s
url: https://login.axway.com/auth
# Uncomment the following line if you are using a proxy to access the Amplify platform (apicentral.axway.com / login.axway.com / platform.axway.com) on port 443
# Configure the appropriate value (PROXY_USER / PROXY_PASSWORD are optional values)
#proxyurl: <PROXY_SCHEME>://<PROXY_USER>:<PROXY_USER_PASSWORD>@<PROXY_URL>:<PROXY_PORT>
clientId:
privateKey: /keys/private_key.pem
publicKey: /keys/public_key.pem

# Uncomment the following line if you are using a proxy to access the AMPLIFY platform (apicentral.axway.com / login.axway.com / platform.axway.com) on port 443
# Configure the appropriate value (PROXY_USER / PROXY_PASSWORD are optional values)
#proxyurl: <PROXY_SCHEME>://<PROXY_USER>:<PROXY_USER_PASSWORD>@<PROXY_URL>:<PROXY_PORT>

log:
level: debug
level: info
format: json
output: stdout
path: logs


mulesoft:
anypointExchangeUrl: https://anypoint.mulesoft.com
environment: "${MULESOFT_ENVIRONMENT}"
pollInterval: 20s
orgName: "${MULESOFT_ORGNAME}"
anypointExchangeUrl:
environment:
pollInterval: 60s
orgName:
# Comma-separated list of tags. Used to filter the APIs that have a particular tag in their configuration.
# Default value: empty. Meaning that no matching is performed.
#discoveryTags: tags1, tags2
Expand All @@ -38,8 +31,6 @@ mulesoft:
# Default value: empty. Meaning that no API is ignored
#discoveryIgnoreTags: tags1, tags2
auth:
username: <USERNAME>
password: <PASSWORD>
clientID: <CLIENTID>
clientSecret: <CLIENTSECRET>
clientID:
clientSecret:

1 change: 1 addition & 0 deletions build/mulesoft_traceability_agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ mulesoft_traceability_agent:
orgName: "${MULESOFT_ORGNAME}"
cachePath: "${MULESOFT_CACHEPATH:/tmp}"
pollInterval: ${MULESOFT_POLLINTERVAL:20s}
useMonitoringAPI: "${MULESOFT_USEMONITORINGAPI}"
auth:
username: "${MULESOFT_AUTH_USERNAME}"
password: "${MULESOFT_AUTH_PASSWORD}"
Expand Down
4 changes: 2 additions & 2 deletions deployment/discovery-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
- name: CENTRAL_AUTH_PUBLICKEY
value: /keys/publicKey
- name: CENTRAL_POLLINTERVAL
value: 20s
value: 60s
- name: CENTRAL_ENVIRONMENT
value:
- name: CENTRAL_TEAM
Expand Down Expand Up @@ -60,7 +60,7 @@ spec:
- name: MULESOFT_ORGNAME
value:
- name: MULESOFT_POLLINTERVAL
value: 20s
value: 60s
- name: MULESOFT_DISCOVERORIGINALRAML
value: false
- name: STATUS_PORT
Expand Down
4 changes: 2 additions & 2 deletions deployment/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
MULESOFT_ANYPOINTEXCHANGEURL: https://anypoint.mulesoft.com
MULESOFT_ENVIRONMENT: Sandbox
MULESOFT_ORGID: <ORG_ID>
MULESOFT_POLLINTERVAL: 20s
MULESOFT_POLLINTERVAL: 60s
MULESOFT_AUTH_USERNAME: <USERNAME>
MULESOFT_AUTH_PASSWORD: <PASSWORD>
MULESOFT_DISCOVERORIGINALRAML: false
Expand All @@ -46,7 +46,7 @@ services:
MULESOFT_ANYPOINTEXCHANGEURL: https://anypoint.mulesoft.com
MULESOFT_ENVIRONMENT:
MULESOFT_ORGNAME: <ORG_NAME>
MULESOFT_POLLINTERVAL: 20s
MULESOFT_POLLINTERVAL: 60s
MULESOFT_AUTH_USERNAME: <USER>
MULESOFT_AUTH_PASSWORD: <PASSWORD>
MULESOFT_CACHEPATH: "/tmp"
Expand Down
4 changes: 2 additions & 2 deletions deployment/traceability-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
- name: CENTRAL_AUTH_PUBLICKEY
value: /keys/publicKey
- name: CENTRAL_POLLINTERVAL
value: 20s
value: 60s
- name: CENTRAL_ENVIRONMENT
value:
- name: CENTRAL_TEAM
Expand Down Expand Up @@ -60,7 +60,7 @@ spec:
- name: MULESOFT_ORGNAME
value:
- name: MULESOFT_POLLINTERVAL
value: 20s
value: 60s
- name: STATUS_PORT
value: "8989"
- name: TRACEABILITY_REDACTION_PATH_SHOW
Expand Down
Loading

0 comments on commit 7453084

Please sign in to comment.