Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

Overview

Devo Collector for MuleSoft Anypoint Platform service.

All collected data is extracted in JSON format using the Audit Log Query API from MuleSoft and it is sent to the corresponding tag: api.mulesoft.anypoint.audit

Devo collector features

Feature

Details

Allow parallel downloading (multipod)

not allowed

Running environments

  • collector server

  • on-premise

Populated Devo events

table

Flattening preprocessing

yes

Data sources

The collector gets data from the following endpoints:

Service

Devo Table

Endpoint

Description

MuleSoft Anypoint Audit events

api.mulesoft.anypoint.audit

POST /audit/v2/organizations/{id}/query{mediaTypeExtension}

 

Retrieves all the audit events since a startDate to the present moment.

Date is expressed in ISO 8601:

YYYY-MM-DDTHH:mm:ssZ

For more information on how the events are parsed, visit our page.

Vendor setup

To configure the MuleSoft Anypoint Collector Service, you have to follow the next steps to setup a Connected App:

Minimum configuration required for basic pulling

Although this collector supports advanced configuration, the fields required to retrieve data with basic configuration are defined below.

This minimum configuration refers exclusively to those specific parameters of this integration. There are more required parameters related to the generic behavior of the collector. Check setting sections for details.

Setting

Details

client_id

User Client ID to authenticate to the service.

client_secret

User Secret Key to authenticate to the service.

Run the collector

Once the data source is configured, you can either send us the required information if you want us to host and manage the collector for you (Cloud collector), or deploy and host the collector in your own machine using a Docker image (On-premise collector).

Collector services detail

This section is intended to explain how to proceed with specific actions for services.

Events service

 Verify data collection

Once the collector has been launched, it is important to check if the ingestion is performed in a proper way. To do so, go to the collector’s logs console.

This service has the following components:

Component

Description

Setup

The setup module is in charge of authenticating the service and managing the token expiration when needed.

Puller

The setup module is in charge of pulling the data in a organized way and delivering the events via SDK.

Setup output

A successful run has the following output messages for the setup module:

2024-02-23T09:29:55.178    INFO InputProcess::CollectorMulesoftPullerSetup(unknown,mulesoft_input#23452,mulesoft_client_api#predefined) -> Setup for module <CollectorMulesoftPuller> has been successfully executed
2024-02-23T09:29:55.271    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Starting data collection every 60 seconds
2024-02-23T09:29:55.749    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Query data from 2024-02-22T21:28:18 to 2024-02-23T14:29:55
2024-02-23T09:29:55.749    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Total events received: 200
2024-02-23T09:29:55.759    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Total events sent: 199
2024-02-23T09:29:55.762    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Data collection completed. Elapsed time: 0.494 seconds. Waiting for 59.506 second(s) until the next one

Puller output

A successful initial run has the following output messages for the puller module:

Note that the PrePull action is executed only one time before the first run of the Pull action.

2024-02-23T09:29:55.178    INFO InputProcess::CollectorMulesoftPullerSetup(unknown,mulesoft_input#23452,mulesoft_client_api#predefined) -> Setup for module <CollectorMulesoftPuller> has been successfully executed
2024-02-23T09:29:55.271    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Starting data collection every 60 seconds
2024-02-23T09:29:55.749    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Query data from 2024-02-22T21:28:18 to 2024-02-23T14:29:55
2024-02-23T09:29:55.749    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Total events received: 200
2024-02-23T09:29:55.759    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Total events sent: 199
2024-02-23T09:29:55.762    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Data collection completed. Elapsed time: 0.494 seconds. Waiting for 59.506 second(s) until the next one
 Restart the persistence

This collector uses persistent storage to download events in an orderly fashion and avoid duplicates. In case you want to re-ingest historical data or recreate the persistence, you can restart the persistence of this collector by following these steps:

  1. Edit the configuration file.

  2. Change the value of the historical_date_utc parameter to a different one.

  3. Save the changes.

  4. Restart the collector.

The collector will detect this change and will restart the persistence using the parameters of the configuration file or the default configuration in case it has not been provided.

Note that this action clears the persistence and cannot be recovered in any way. Resetting persistence could result in duplicate or lost events.

 Troubleshooting

This collector has different security layers that detect both an invalid configuration and abnormal operation. This table will help you detect and resolve the most common errors.

Error type

Error ID

Error message

Cause

Solution

InitVariablesError

1

Missing required "credentials"

This error is raised when devo_tag property is not found in collector_definitions.yaml.

This is an internal issue. Contact with Devo Support team.

SetupError

100

Unauthorized call when trying to get the access token. Please check client_id and client_secret in config file."

 

 

SetupError

101

"Unauthorized call when trying to get the organization id. ""Please check the access token."

 

 

Collector operations

This section is intended to explain how to proceed with specific operations of this collector.

 Verify collector operations

Initialization

The initialization module is in charge of setup and running the input (pulling logic) and output (delivering logic) services and validating the given configuration.

A successful run has the following output messages for the initializer module:

2024-02-23T09:29:53.450    INFO MainProcess::MainThread -> Added "/Users/scottbronkema/collector/devo-collector-mulesoft" directory to the Python path
2024-02-23T09:29:53.450    INFO MainProcess::MainThread -> Added "/Users/scottbronkema/collector/devo-collector-mulesoft/config_internal" directory to the Python path
2024-02-23T09:29:53.450    INFO MainProcess::MainThread -> Added "/Users/scottbronkema/collector/devo-collector-mulesoft/schemas" directory to the Python path
2024-02-23T09:29:53.618    INFO MainProcess::MainThread -> Production mode: False, execute only setup and exit: False, Python version: "3.9.17 (main, Jun 20 2023, 17:20:08) [Clang 14.0.3 (clang-1403.0.22.14.1)]", DCSDK version: "1.11.0", External IP: "108.70.132.211", current dir: "/Users/scottbronkema/collector/devo-collector-mulesoft", exists "config" dir: True, exists "config_internal" dir: True, exists "certs" dir: True, exists "schemas" dir: True, exists "credentials" dir: True
2024-02-23T09:29:53.631    INFO MainProcess::MainThread -> Loading configuration using the following files: {"full_config": "config.yaml", "job_config_loc": null, "collector_config_loc": null}
2024-02-23T09:29:53.631    INFO MainProcess::MainThread -> Using the default location for "job_config_loc" file: "/etc/devo/job/job_config.json"
2024-02-23T09:29:53.631    INFO MainProcess::MainThread -> Using the default location for "collector_config_loc" file: "/etc/devo/collector/collector_config.json"
2024-02-23T09:29:53.633    INFO MainProcess::MainThread -> List of files in directory "/etc/devo/collector": []
2024-02-23T09:29:53.633    INFO MainProcess::MainThread -> Results of validation of config files parameters: {"config": "/Users/scottbronkema/collector/devo-collector-mulesoft/config/config.yaml", "config_validated": True, "job_config_loc": "/etc/devo/job/job_config.json", "job_config_loc_default": True, "job_config_loc_validated": True, "collector_config_loc": "/etc/devo/collector/collector_config.json", "collector_config_loc_default": True, "collector_config_loc_validated": False}
2024-02-23T09:29:53.639 WARNING MainProcess::MainThread -> [WARNING] Illegal global setting has been ignored -> multiprocessing: False
2024-02-23T09:29:53.640 WARNING MainProcess::MainThread -> [MAIN] Detected some not valid symbol in globals.name property, it will be replaced by "_" symbol. Original value: mulesoft.collector, final value: mulesoft_collector
2024-02-23T09:29:53.689    INFO MainProcess::MainThread -> Build time: "UNKNOWN", OS: "macOS-14.2.1-x86_64-i386-64bit", collector(name:version): "mulesoft.collector:1.0.0", owner: "integrationsfactory@devo.com", started at: "2024-02-23T14:29:53.644727Z"
2024-02-23T09:29:53.708    INFO MainProcess::MainThread -> Initialized all object from "MainProcess" process
2024-02-23T09:29:53.709    INFO MainProcess::MainThread -> OutputProcess - Starting thread (executing_period=120s)
2024-02-23T09:29:53.714    INFO MainProcess::MainThread -> InputProcess - Starting thread (executing_period=120s)
2024-02-23T09:29:53.722    INFO MainProcess::MainThread -> Started all object from "MainProcess" process
2024-02-23T09:29:54.164    INFO OutputProcess::MainThread -> Process started
2024-02-23T09:29:54.182    INFO InputProcess::MainThread -> Process Started
2024-02-23T09:29:54.241 WARNING InputProcess::MainThread -> A previous rate limiter with same "period_in_seconds" and "number_of requests" was already existing: "1/15"
2024-02-23T09:29:54.243 WARNING InputProcess::MainThread -> A previous rate limiter with same "period_in_seconds" and "number_of requests" was already existing: "1/15"
2024-02-23T09:29:54.255    INFO OutputProcess::MainThread -> ConsoleSender(standard_senders,console_sender_0) -> Starting thread
2024-02-23T09:29:54.256    INFO OutputProcess::MainThread -> ConsoleSenderManagerMonitor(standard_senders,console_1) -> Starting thread (every 300 seconds)
2024-02-23T09:29:54.256    INFO OutputProcess::MainThread -> ConsoleSenderManager(standard_senders,manager,console_1) -> Starting thread
2024-02-23T09:29:54.256    INFO OutputProcess::OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY PERSISTENCE SYSTEM] OutputStandardConsumer(standard_senders_consumer_0) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.256    INFO OutputProcess::ConsoleSenderManager(standard_senders,manager,console_1) -> [EMERGENCY PERSISTENCE SYSTEM] ConsoleSenderManager(standard_senders,manager,console_1) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.256    INFO OutputProcess::MainThread -> ConsoleSender(lookup_senders,console_sender_0) -> Starting thread
2024-02-23T09:29:54.257    INFO OutputProcess::MainThread -> ConsoleSenderManagerMonitor(lookup_senders,console_1) -> Starting thread (every 300 seconds)
2024-02-23T09:29:54.257    INFO OutputProcess::MainThread -> ConsoleSenderManager(lookup_senders,manager,console_1) -> Starting thread
2024-02-23T09:29:54.257    INFO OutputProcess::MainThread -> ConsoleSender(internal_senders,console_sender_0) -> Starting thread
2024-02-23T09:29:54.257    INFO OutputProcess::ConsoleSenderManager(lookup_senders,manager,console_1) -> [EMERGENCY PERSISTENCE SYSTEM] ConsoleSenderManager(lookup_senders,manager,console_1) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.257    INFO OutputProcess::MainThread -> ConsoleSenderManagerMonitor(internal_senders,console_1) -> Starting thread (every 300 seconds)
2024-02-23T09:29:54.257    INFO OutputProcess::MainThread -> ConsoleSenderManager(internal_senders,manager,console_1) -> Starting thread
2024-02-23T09:29:54.257    INFO OutputProcess::OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY PERSISTENCE SYSTEM] OutputLookupConsumer(lookup_senders_consumer_0) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.266    INFO InputProcess::MainThread -> InputThread(mulesoft_input,23452) - Starting thread (execution_period=60s)
2024-02-23T09:29:54.266    INFO InputProcess::MainThread -> ServiceThread(mulesoft_input,23452,mulesoft_client_api,predefined) - Starting thread (execution_period=60s)
2024-02-23T09:29:54.266    INFO InputProcess::MainThread -> CollectorMulesoftPullerSetup(unknown,mulesoft_input#23452,mulesoft_client_api#predefined) -> Starting thread
2024-02-23T09:29:54.266    INFO InputProcess::MainThread -> CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) - Starting thread
2024-02-23T09:29:54.267    INFO OutputProcess::ConsoleSenderManager(internal_senders,manager,console_1) -> [EMERGENCY PERSISTENCE SYSTEM] ConsoleSenderManager(internal_senders,manager,console_1) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.267 WARNING InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Waiting until setup will be executed
2024-02-23T09:29:54.267    INFO OutputProcess::MainThread -> [GC] global: 66.2% -> 66.2%, process: RSS(39.45MiB -> 39.46MiB), VMS(32.82GiB -> 32.82GiB)
2024-02-23T09:29:54.268    INFO OutputProcess::OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY PERSISTENCE SYSTEM] OutputInternalConsumer(internal_senders_consumer_0) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.268    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:53.690", "message_tag": "devo.collectors.out.global.info", "message_content": "{\"msg\": \"Build time: \\\"UNKNOWN\\\", OS: \\\"macOS-14.2.1-x86_64-i386-64bit\\\", collector(name:version): \\\"mulesoft.collector:1.0.0\\\", owner: \\\"integrationsfactory@devo.com\\\", started at: \\\"2024-02-23T14:29:53.644727Z\\\"\", \"time\": \"2024-02-23T14:29:53.690096Z\", \"level\": \"info\", \"collector_name\": \"mulesoft.collector\", \"collector_version\": \"1.0.0\", \"collector_image\": null, \"shared_domain\": true}"}
2024-02-23T09:29:54.268    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:53.715", "message_tag": "devo.collectors.out.local.info", "message_content": "{\"msg\": \"InputProcess - Starting thread (executing_period=120s)\", \"time\": \"2024-02-23T14:29:53.715496Z\", \"level\": \"info\", \"collector_name\": \"mulesoft.collector\", \"collector_version\": \"1.0.0\", \"collector_image\": null}"}
2024-02-23T09:29:54.269    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:54.182", "message_tag": "devo.collectors.out.local.info", "message_content": "{\"msg\": \"Process Started\", \"time\": \"2024-02-23T14:29:54.182902Z\", \"level\": \"info\", \"collector_name\": \"unknown\", \"collector_version\": \"unknown\", \"collector_image\": null}"}
2024-02-23T09:29:54.269    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:54.266", "message_tag": "devo.collectors.out.local.info", "message_content": "{\"msg\": \"InputThread(mulesoft_input,23452) - Starting thread (execution_period=60s)\", \"time\": \"2024-02-23T14:29:54.266276Z\", \"level\": \"info\", \"collector_name\": \"unknown\", \"collector_version\": \"unknown\", \"collector_image\": null, \"input_name\": \"mulesoft_input\"}"}
2024-02-23T09:29:54.270    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:54.266", "message_tag": "devo.collectors.out.local.info", "message_content": "{\"msg\": \"ServiceThread(mulesoft_input,23452,mulesoft_client_api,predefined) - Starting thread (execution_period=60s)\", \"time\": \"2024-02-23T14:29:54.266539Z\", \"level\": \"info\", \"collector_name\": \"unknown\", \"collector_version\": \"unknown\", \"collector_image\": null, \"input_name\": \"mulesoft_input\", \"service_name\": \"mulesoft_client_api\"}"}
2024-02-23T09:29:54.270    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:54.267", "message_tag": "devo.collectors.out.local.info", "message_content": "{\"msg\": \"CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) - Starting thread\", \"time\": \"2024-02-23T14:29:54.267032Z\", \"level\": \"info\", \"collector_name\": \"unknown\", \"collector_version\": \"unknown\", \"collector_image\": null, \"input_name\": \"mulesoft_input\", \"service_name\": \"mulesoft_client_api\", \"module_name\": \"CollectorMulesoftPuller\"}"}
2024-02-23T09:29:54.270    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:54.267", "message_tag": "devo.collectors.out.local.warning", "message_content": "{\"msg\": \"Waiting until setup will be executed\", \"time\": \"2024-02-23T14:29:54.267464Z\", \"level\": \"warning\", \"collector_name\": \"unknown\", \"collector_version\": \"unknown\", \"collector_image\": null, \"input_name\": \"mulesoft_input\", \"service_name\": \"mulesoft_client_api\", \"module_name\": \"CollectorMulesoftPuller\"}"}
2024-02-23T09:29:54.279    INFO InputProcess::MainThread -> [GC] global: 66.2% -> 66.2%, process: RSS(39.31MiB -> 39.32MiB), VMS(32.73GiB -> 32.73GiB)

Events delivery and Devo ingestion

The event delivery module is in charge of receiving the events from the internal queues where all events are injected by the pullers and delivering them using the selected compatible delivery method.

A successful run has the following output messages for the initializer module:

INFO OutputProcess::SyslogSenderManagerMonitor(standard_senders,sidecar_0) -> Number of available senders: 1, sender manager internal queue size: 0
INFO OutputProcess::SyslogSenderManagerMonitor(standard_senders,sidecar_0) -> enqueued_elapsed_times_in_seconds_stats: {}
INFO OutputProcess::SyslogSenderManagerMonitor(standard_senders,sidecar_0) -> Sender: SyslogSender(standard_senders,syslog_sender_0), status: {"internal_queue_size": 0, "is_connection_open": True}
INFO OutputProcess::SyslogSenderManagerMonitor(standard_senders,sidecar_0) -> Standard - Total number of messages sent: 44, messages sent since "2022-06-28 10:39:22.511671+00:00": 44 (elapsed 0.007 seconds)
INFO OutputProcess::SyslogSenderManagerMonitor(internal_senders,sidecar_0) -> Number of available senders: 1, sender manager internal queue size: 0
INFO OutputProcess::SyslogSenderManagerMonitor(internal_senders,sidecar_0) -> enqueued_elapsed_times_in_seconds_stats: {}
INFO OutputProcess::SyslogSenderManagerMonitor(internal_senders,sidecar_0) -> Sender: SyslogSender(internal_senders,syslog_sender_0), status: {"internal_queue_size": 0, "is_connection_open": True}
INFO OutputProcess::SyslogSenderManagerMonitor(internal_senders,sidecar_0) -> Internal - Total number of messages sent: 1, messages sent since "2022-06-28 10:39:22.516313+00:00": 1 (elapsed 0.019 seconds)

By default, these information traces will be displayed every 10 minutes.

Sender services

The Integrations Factory Collector SDK has 3 different senders services depending on the event type to delivery (internal, standard, and lookup). This collector uses the following Sender Services:

Sender services

Description

internal_senders

In charge of delivering internal metrics to Devo such as logging traces or metrics.

standard_senders

In charge of delivering pulled events to Devo.

Sender statistics

Each service displays its own performance statistics that allow checking how many events have been delivered to Devo by type:

Logging trace

Description

Number of available senders: 1

Displays the number of concurrent senders available for the given Sender Service.

sender manager internal queue size: 0

Displays the items available in the internal sender queue.

This value helps detect bottlenecks and needs to increase the performance of data delivery to Devo. This last can be made by increasing the concurrent senders.

Total number of messages sent: 44, messages sent since "2022-06-28 10:39:22.511671+00:00": 21 (elapsed 0.007 seconds)

Displayes the number of events from the last time and following the given example, the following conclusions can be obtained:

  • 44 events were sent to Devo since the collector started.

  • The last checkpoint timestamp was 2022-06-28 10:39:22.511671+00:00.

  • 21 events where sent to Devo between the last UTC checkpoint and now.

  • Those 21 events required 0.007 seconds to be delivered.

By default these traces will be shown every 10 minutes.

 Check memory usage

To check the memory usage of this collector, look for the following log records in the collector which are displayed every 5 minutes by default, always after running the memory-free process.

  • The used memory is displayed by running processes and the sum of both values will give the total used memory for the collector.

  • The global pressure of the available memory is displayed in the global value.

  • All metrics (Global, RSS, VMS) include the value before freeing and after previous -> after freeing memory

INFO InputProcess::MainThread -> [GC] global: 20.4% -> 20.4%, process: RSS(34.50MiB -> 34.08MiB), VMS(410.52MiB -> 410.02MiB)
INFO OutputProcess::MainThread -> [GC] global: 20.4% -> 20.4%, process: RSS(28.41MiB -> 28.41MiB), VMS(705.28MiB -> 705.28MiB)

Differences between RSS and VMS memory usage:

  • RSS is the Resident Set Size, which is the actual physical memory the process is using

  • VMS is the Virtual Memory Size which is the virtual memory that process is using

 Enable/disable the logging debug mode

Sometimes it is necessary to activate the debug mode of the collector's logging. This debug mode increases the verbosity of the log and allows you to print execution traces that are very helpful in resolving incidents or detecting bottlenecks in heavy download processes.

  • To enable this option you just need to edit the configuration file and change the debug_status parameter from false to true and restart the collector.

  • To disable this option, you just need to update the configuration file and change the debug_status parameter from true to false and restart the collector.

For more information, visit the configuration and parameterization section corresponding to the chosen deployment mode.

Change log

Release

Released on

Release type

Details

Recommendations

v1.0.0

FEATURE

Initial Release

Recommended

  • No labels