=======
This repository contains scripts and configurations for generating and managing an event catalog automatically. As long as you are running the node server main.js any changes made in eventNames.json, eventPatterns.json, consumer.json will automatically reflect the changes in event catalog without the need to recreate events manually.
- Extract all event types from the kibana using this query POST /eventstore/_search
"size": 0,
"aggs": {
"unique_event_types": {
"terms": {
"field": "type",
"size": 1000000
},
"aggs": {
"example_event": {
"top_hits": {
"size": 1
}
}
}
}
}
}
and save it in event-catalog-automation/json/originalPayload.json file.
- Extract all event types from the
event-catalog-automation/json/originalPayload.jsonand save them inevemt-catalog-automation/json/eventNames.jsonusing the python scripteventtype_extractor.py.
- Run the
PIFaker.jsscript located atevent-catalog-automation/jsusing the command:
This will fake all the information and create a JSON file named anonymized_events.json in event-catalog-automation/json/autogenerated.
- Add all event patterns to the
event-catalog-automation/json/eventPatterns.jsonfile for each service. - For example, if a service name is
SampleService, then it should have all the events likesample.test,sample.test.new, etc. So, the pattern will besample.test.
- Add all producers to the consumer configuration in
event-catalog-automation/json/consumer.json. - The producer is the key, and the consumer is a list of consumers for that producer.
- Execute the
main.jsscript located atevent-catalog-automation/jsusing the command:
- Navigate to the
event-catalog/directory. - Run the following command to start the development server:
- Once the development server is running, you can access the catalog at
localhost:3000.
- Make sure to follow the steps in the specified order for proper setup and execution.
- Ensure that all required dependencies are installed before running the scripts.