Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tkobayas/2d28799160fb6ce5ca312e473a5cacf7 to your computer and use it in GitHub Desktop.
Save tkobayas/2d28799160fb6ce5ca312e473a5cacf7 to your computer and use it in GitHub Desktop.
output of running fixed test_is_not_defined.yml
$ ./run_examples1.sh
RUNNING examples/test_is_not_defined.yml
2024-09-10 14:44:36,776 - asyncio - DEBUG - Using selector: EpollSelector
2024-09-10 14:44:36,776 - ansible_rulebook.app - DEBUG - Loading rules from the file system ./examples/test_is_not_defined.yml
2024-09-10 14:44:36,790 - ansible_rulebook.condition_parser - DEBUG - [Identifier(value='event.beta'), 'is', String(value='defined')]
2024-09-10 14:44:36,795 - ansible_rulebook.condition_parser - DEBUG - [Identifier(value='event.beta.xheaders.age'), 'is not', String(value='defined')]
2024-09-10 14:44:36,795 - ansible_rulebook.app - INFO - Starting sources
2024-09-10 14:44:36,795 - ansible_rulebook.app - INFO - Starting rules
2024-09-10 14:44:36,795 - ansible_rulebook.engine - DEBUG - run_ruleset
2024-09-10 14:44:36,796 - drools.ruleset - INFO - Using jar: /home/tkobayas/usr/work/latest-tmp/drools_jpy/src/drools/jars/drools-ansible-rulebook-integration-runtime-1.0.6-SNAPSHOT.jar
2024-09-10 14:44:36,876 - drools.ruleset - DEBUG - Creating Drools Ruleset
2024-09-10 14:44:37 348 [main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.AbstractRulesEvaluator - Start automatic pseudo clock with a tick every 100 milliseconds
2024-09-10 14:44:37,352 - drools.ruleset - DEBUG - Ruleset Session ID : 1
2024-09-10 14:44:37,353 - ansible_rulebook.engine - DEBUG - ruleset define: {"name": "Checking not defined", "hosts": ["all"], "sources": [{"EventSource": {"name": "generic", "source_name": "ansible.eda.generic", "source_args": {"payload": [{"meta": {"headers": {"token": 123}}}, {"beta": {"headers": {"age": 23}}}]}, "source_filters": []}}], "rules": [{"Rule": {"name": "r1", "condition": {"AllCondition": [{"IsDefinedExpression": {"Event": "beta"}}, {"IsNotDefinedExpression": {"Event": "beta.xheaders.age"}}]}, "actions": [{"Action": {"action": "debug", "action_args": {}}}], "enabled": true}}]}
2024-09-10 14:44:37,353 - drools.dispatch - DEBUG - Establishing async channel
2024-09-10 14:44:37,362 - ansible_rulebook.engine - INFO - load source ansible.eda.generic
2024-09-10 14:44:37,752 - ansible_rulebook.engine - INFO - loading source filter eda.builtin.insert_meta_info
2024-09-10 14:44:38,113 - ansible_rulebook.engine - DEBUG - Calling main in ansible.eda.generic
2024-09-10 14:44:38,114 - ansible_rulebook.engine - INFO - Waiting for all ruleset tasks to end
2024-09-10 14:44:38,114 - ansible_rulebook.rule_set_runner - INFO - Waiting for actions on events from Checking not defined
2024-09-10 14:44:38,114 - ansible_rulebook.rule_set_runner - INFO - Waiting for events, ruleset: Checking not defined
** 2024-09-10 14:44:38.114519 [received event] ***********************************************************************************************************************************************************************************************
Ruleset: Checking not defined
Event:
2024-09-10 14:44:38 114 [drools-async-evaluator-thread] INFO org.drools.ansible.rulebook.integration.api.io.RuleExecutorChannel - Async channel connected
{'meta': {'headers': {'token': 123},
'received_at': '2024-09-10T05:44:38.113332Z',
'source': {'name': 'generic', 'type': 'ansible.eda.generic'},
'uuid': '1ccf6a79-9ba4-4007-8f0c-51abd4f7d9a4'}}
**********************************************************************************************************************************************************************************************************************************************
2024-09-10 14:44:38,114 - ansible_rulebook.rule_set_runner - DEBUG - Posting data to ruleset Checking not defined => {'meta': {'headers': {'token': 123}, 'source': {'name': 'generic', 'type': 'ansible.eda.generic'}, 'received_at': '2024-09-10T05:44:38.113332Z', 'uuid': '1ccf6a79-9ba4-4007-8f0c-51abd4f7d9a4'}}
2024-09-10 14:44:38 116 [main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.MemoryMonitorUtil - Memory occupation threshold set to 90%
2024-09-10 14:44:38 116 [main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.MemoryMonitorUtil - Memory check event count threshold set to 64
2024-09-10 14:44:38 116 [main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.MemoryMonitorUtil - Exit above memory occupation threshold set to false
2024-09-10 14:44:38 132 [main] DEBUG org.drools.ansible.rulebook.integration.api.rulesengine.AbstractRulesEvaluator - Event {"meta":{"headers":{"token":123},"source":{"name":"generic","type":"ansible.eda.generic"},"received_at":"2024-09-10T05:44:38.113332Z","uuid":"1ccf6a79-9ba4-4007-8f0c-51abd4f7d9a4"}} didn't match any rule and has been immediately discarded
2024-09-10 14:44:38,134 - ansible_rulebook.rule_set_runner - DEBUG - None
** 2024-09-10 14:44:38.134944 [received event] ***********************************************************************************************************************************************************************************************
Ruleset: Checking not defined
Event:
{'beta': {'headers': {'age': 23}},
'meta': {'received_at': '2024-09-10T05:44:38.113724Z',
'source': {'name': 'generic', 'type': 'ansible.eda.generic'},
'uuid': 'fcc9dc32-e626-444a-8087-58482904bcb9'}}
**********************************************************************************************************************************************************************************************************************************************
2024-09-10 14:44:38,135 - ansible_rulebook.rule_set_runner - DEBUG - Posting data to ruleset Checking not defined => {'beta': {'headers': {'age': 23}}, 'meta': {'source': {'name': 'generic', 'type': 'ansible.eda.generic'}, 'received_at': '2024-09-10T05:44:38.113724Z', 'uuid': 'fcc9dc32-e626-444a-8087-58482904bcb9'}}
2024-09-10 14:44:38 152 [main] DEBUG org.drools.ansible.rulebook.integration.api.rulesengine.RegisterOnlyAgendaFilter - Activation of effective rule "r1" with facts: {m_0={meta={source={name=generic, type=ansible.eda.generic}, received_at=2024-09-10T05:44:38.113724Z, uuid=fcc9dc32-e626-444a-8087-58482904bcb9}, beta={headers={age=23}}}}
2024-09-10 14:44:38,154 - drools.ruleset - DEBUG - Calling rule : r1 in session: 1
2024-09-10 14:44:38,154 - ansible_rulebook.rule_generator - DEBUG - callback calling r1
2024-09-10 14:44:38,154 - ansible_rulebook.rule_set_runner - DEBUG - None
2024-09-10 14:44:38,154 - ansible_rulebook.rule_set_runner - DEBUG - Creating action task action::debug::Checking not defined::r1
2024-09-10 14:44:38,154 - ansible_rulebook.rule_set_runner - DEBUG - call_action debug
2024-09-10 14:44:38,154 - ansible_rulebook.rule_set_runner - DEBUG - substitute_variables [{}] [{'events': {'m_0': {'meta': {'source': {'name': 'generic', 'type': 'ansible.eda.generic'}, 'received_at': '2024-09-10T05:44:38.113724Z', 'uuid': 'fcc9dc32-e626-444a-8087-58482904bcb9'}, 'beta': {'headers': {'age': 23}}}}}]
2024-09-10 14:44:38,155 - ansible_rulebook.rule_set_runner - DEBUG - action args: {}
** 2024-09-10 14:44:38.155142 [debug: kwargs] ************************************************************************************************************************************************************************************************
{'hosts': ['all'],
'inventory': './playbooks/inventory.yml',
'project_data_file': None,
'rule': 'r1',
'rule_run_at': '2024-09-10T05:44:38.154812Z',
'rule_set': 'Checking not defined',
'rule_set_uuid': '6cc9a18b-e5b2-4e4d-befe-0253f78a1aaa',
'rule_uuid': '1ba17dc5-66a5-43a9-9e65-3e27eeea18ee',
'variables': {'events': {'m_0': {'beta': {'headers': {'age': 23}},
'meta': {'received_at': '2024-09-10T05:44:38.113724Z',
'source': {'name': 'generic',
'type': 'ansible.eda.generic'},
'uuid': 'fcc9dc32-e626-444a-8087-58482904bcb9'}}}}}
**********************************************************************************************************************************************************************************************************************************************
** 2024-09-10 14:44:38.156910 [debug: facts] *************************************************************************************************************************************************************************************************
[]
**********************************************************************************************************************************************************************************************************************************************
2024-09-10 14:44:38,157 - ansible_rulebook.engine - DEBUG - Broadcast shutdown to all source plugins
2024-09-10 14:44:38,157 - ansible_rulebook.rule_set_runner - DEBUG - Task action::debug::Checking not defined::r1 finished, active actions 0
2024-09-10 14:44:38,157 - ansible_rulebook.engine - DEBUG - Broadcast to queues: [<Queue at 0x7f76b80e46d0 maxsize=1 _getters[1] tasks=2>]
2024-09-10 14:44:38,157 - ansible_rulebook.engine - DEBUG - Broadcasting shutdown: Shutdown(message='Source ansible.eda.generic initiated shutdown at 2024-09-10 14:44:38.157005', delay=60.0, kind='graceful', source_plugin='ansible.eda.generic')
** 2024-09-10 14:44:38.157273 [received event] ***********************************************************************************************************************************************************************************************
Ruleset: Checking not defined
Event:
Shutdown(message='Source ansible.eda.generic initiated shutdown at 2024-09-10 14:44:38.157005', delay=60.0, kind='graceful', source_plugin='ansible.eda.generic')
**********************************************************************************************************************************************************************************************************************************************
2024-09-10 14:44:38,157 - ansible_rulebook.rule_set_runner - INFO - Ruleset: Checking not defined, received shutdown: Shutdown(message='Source ansible.eda.generic initiated shutdown at 2024-09-10 14:44:38.157005', delay=60.0, kind='graceful', source_plugin='ansible.eda.generic')
2024-09-10 14:44:38,157 - ansible_rulebook.rule_set_runner - DEBUG - ruleset: Checking not defined shutdown no pending work
2024-09-10 14:44:38,157 - ansible_rulebook.rule_set_runner - DEBUG - Action Plan Task Cancelled for ruleset Checking not defined
2024-09-10 14:44:38,157 - ansible_rulebook.rule_set_runner - DEBUG - Cleaning up ruleset Checking not defined
2024-09-10 14:44:38 179 [main] INFO org.drools.ansible.rulebook.integration.api.RulesExecutor - Disposing session with id: 1; SessionStats{start='2024-09-10T05:44:37.342313261Z', end='2024-09-10T05:44:38.159836391Z', lastClockTime='2024-09-10T05:44:38.143Z', clockAdvanceCount=8, numberOfRules=1, numberOfDisabledRules=0, rulesTriggered=1, eventsProcessed=2, eventsMatched=1, eventsSuppressed=1, permanentStorageCount=0, permanentStorageSize=0, asyncResponses=0, bytesSentOnAsync=0, sessionId=1, ruleSetName='Checking not defined', lastRuleFired='r1', lastRuleFiredAt='2024-09-10T05:44:38.043Z', lastEventReceivedAt='2024-09-10T05:44:38.043Z', usedMemory='18015696', maxAvailableMemory='536870912'}
2024-09-10 14:44:38,186 - ansible_rulebook.rule_set_runner - INFO - {'asyncResponses': 0,
'bytesSentOnAsync': 0,
'clockAdvanceCount': 8,
'end': '2024-09-10T05:44:38.159836391Z',
'eventsMatched': 1,
'eventsProcessed': 2,
'eventsSuppressed': 1,
'lastClockTime': '2024-09-10T05:44:38.143Z',
'lastEventReceivedAt': '2024-09-10T05:44:38.043Z',
'lastRuleFired': 'r1',
'lastRuleFiredAt': '2024-09-10T05:44:38.043Z',
'maxAvailableMemory': 536870912,
'numberOfDisabledRules': 0,
'numberOfRules': 1,
'permanentStorageCount': 0,
'permanentStorageSize': 0,
'ruleSetName': 'Checking not defined',
'rulesTriggered': 1,
'sessionId': 1,
'start': '2024-09-10T05:44:37.342313261Z',
'usedMemory': 19586512}
2024-09-10 14:44:38,186 - ansible_rulebook.engine - INFO - Cancelling all ruleset tasks
2024-09-10 14:44:38,186 - ansible_rulebook.engine - DEBUG - Waiting on gather
2024-09-10 14:44:38,186 - ansible_rulebook.engine - DEBUG - Returning from run_rulesets
2024-09-10 14:44:38,186 - ansible_rulebook.app - INFO - Cancelling event source tasks
2024-09-10 14:44:38,186 - drools.dispatch - DEBUG - Shutting down async channel
2024-09-10 14:44:38,188 - ansible_rulebook.app - INFO - Main complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment