Skip to main content

Parameters

Parameters

--conf Path to configuration file
--filter_conf Path to message filter archive
--verbosity Used to activate debug mode

Conf file (--conf)

db_path = Path to sql database lite
threads = < Maximum number of threads used >
timestamp_filter = < Timestamp in seconds from which the messages will be filtered >
agents_group_name = < Group name for the created agents >
interval = < Interval in seconds for the agents >
tentacle_ip = < IP of the target machine for the created agents >
tentacle_port = < Tentacle port, default : 41121 >

Example

db_path = /var/spool/pandora/data_in/discovery/pandorafms.iot/mqtt_messages.db
threads = 4
timestamp_filter = 1738000000
agents_group_name = Unknown
interval = 300
tentacle_ip = 127.0.0.1
tentacle_port = 41121 

File to filter messages (--filter_conf)

#=======================================================================  
# Filter Configuration  
#=======================================================================  
filter_begin: < Marks the beginning of a filter configuration. Everything until filter_end belongs to the same filter. Mandatory. >  
filter_module_name: < Name assigned to the module that generates the filter. Mandatory. >  
filter_module_type: < Type of module that generates the filter. Mandatory. >  
filter_topic: < Regular expression or exact text that must match the message topic for the filter to apply. Optional. By default, it matches any topic. >  
filter_topic_exact_match: < Defines whether filter_topic is treated as a regular expression (0) or exact text (1). Optional. Default is 0. >  
filter_message: < Regular expression or exact text that must match the message content for the filter to apply. Optional. By default, it matches any message. >  
filter_message_exact_match: < Defines whether filter_message is treated as a regular expression (0) or exact text (1). Optional. Default is 0. >  
filter_message_capture_regex: < Regular expression with capture groups to extract values from the message. >  
                               < Captured values will be stored in macros '__regexN__', where N is the capture group index. >  
filter_message_capture_json: < List of JSON paths (separated by '|') to extract values, using the same format as jq. >  
                               < Captured values will be stored in macros '__jsonN__', where N is the path index. >  
filter_module_value: < Value assigned to the module that generates the filter. Mandatory. >  
filter_end: < Marks the end of a filter configuration. Everything from filter_begin belongs to the same filter. Mandatory. >  

# Available macros for use in filter_module_name and filter_module_value:  
__topic__: < Replaced with the exact topic of the processed message. >  
__regexN__: < Replaced with the corresponding value captured by filter_message_capture_regex. >  
__jsonN__: < Replaced with the corresponding value captured by filter_message_capture_json. >  

Example

filter_begin​
filter_module_name pressure
filter_module_type generic_data_string
filter_topic sensor/humidity
filter_topic_exact_match 1
filter_message Value:
filter_message_exact_match 1
filter_message_capture_regex (\b\w{6}\b).*?(\b\w{7}\b).*?(\d{3})\s(\w)-
filter_message_capture_json 
filter_module_value 1__regex1__ __regex2__ __topic__
filter_end

filter_begin​
filter_module_name humidity
filter_module_type generic_data_string
filter_topic sensor/pressure
filter_topic_exact_match 1
filter_message 
filter_message_exact_match 1
filter_message_capture_regex 
filter_message_capture_json $.extra_info[0].value|$.extra_info[1].value
filter_module_value 2 __json1__ __json2__
filter_end