mongoose.models.configuration
- class mongoose.models.configuration.CacheConfiguration(*, severity=None)[source]
Bases:
BaseModel- severity: CacheSeverityConfiguration | None
Top-level cache configuration. Currently only severity cache is supported.
- class mongoose.models.configuration.CacheSeverityConfiguration(*, enable=True, max_size=1024, ttl_seconds=None)[source]
Bases:
BaseModelConfiguration for the severity cache used for Suricata alerts.
- class mongoose.models.configuration.CollectorConfiguration(*, suricata=None, nf_stream=None)[source]
Bases:
BaseModel- nf_stream: NFStreamConfiguration | None
- suricata: SuricataEveConfiguration | None
- class mongoose.models.configuration.Configuration(*, collector, enrichment, forwarder, database_path=PosixPath('mongoose.db'), history=None, extra_configuration_dir=PosixPath('/var/lib/mongoose'), cache=None)[source]
Bases:
BaseModelConfiguration for the Mongoose application.
- cache: CacheConfiguration | None
- collector: CollectorConfiguration
- database_path: Path
- enrichment: EnrichmentConfiguration
- extra_configuration_dir: Path
- forwarder: ForwarderConfiguration
- history: HistoryConfiguration | None
- class mongoose.models.configuration.DiscordForwarderConfiguration(*, url, headers=None, auth_type='none', auth_token=None, auth_header_name='X-API-Key', verify_ssl=True, retry_count=3, retry_delay=5.0, timeout=10.0, enable=False, topics=None, mode='immediate', bulk_size=10, periodic_interval=5.0, periodic_rate=10, username=None, avatar_url=None, allowed_mentions=None)[source]
Bases:
WebhookForwarderConfigurationDiscord-specific forwarder configuration.
Inherits the generic webhook configuration and adds fields that are specific to Discord webhooks: username, avatar_url, and allowed_mentions to control mentions and avoid mass pings.
- class mongoose.models.configuration.EnrichmentConfiguration(*, geoip=None)[source]
Bases:
BaseModel- geoip: GeoIPConfiguration | None
- class mongoose.models.configuration.FileForwarderConfiguration(*, output_dir='output', topics=None, prefix='', enable=False)[source]
Bases:
BaseModelConfiguration for the File Forwarder.
- class mongoose.models.configuration.ForwarderConfiguration(*, file=None, webhooks=[], discord=[])[source]
Bases:
BaseModel- discord: List[DiscordForwarderConfiguration] | None
- file: FileForwarderConfiguration | None
- webhooks: List[WebhookForwarderConfiguration] | None
- class mongoose.models.configuration.GeoIPConfiguration(*, maxmind_db_path=PosixPath('/var/lib/GeoIP'), maxmind_db=['GeoLite2-ASN.mmdb', 'GeoLite2-City.mmdb', 'GeoLite2-Country.mmdb'], enable=True)[source]
Bases:
BaseModel- maxmind_db_path: Path
The path to the GeoIP databases.
- class mongoose.models.configuration.HistoryConfiguration(*, max_records=None, max_duration_days=14, enable=True)[source]
Bases:
BaseModelConfiguration for history limiting in the database.
- class mongoose.models.configuration.NFStreamConfiguration(*, active_timeout=120, interface, max_nflows=0, enable=True)[source]
Bases:
BaseModelConfiguration for the NFStream collector.
- class mongoose.models.configuration.SuricataEveConfiguration(*, socket_path=PosixPath('/run/suricata.socket'), collect_alerts=True, collect_netflow=False, enable=True)[source]
Bases:
BaseModelA configuration for the Suricata EVE collector.
- socket_path: Path
Specifies whether the Suricata EVE collector is disabled. Defaults to False.
- class mongoose.models.configuration.WebhookForwarderConfiguration(*, url, headers=None, auth_type='none', auth_token=None, auth_header_name='X-API-Key', verify_ssl=True, retry_count=3, retry_delay=5.0, timeout=10.0, enable=False, topics=None, mode='immediate', bulk_size=10, periodic_interval=5.0, periodic_rate=10)[source]
Bases:
BaseModelConfiguration for the Webhook Forwarder.
This class defines the destination, authentication, and reliability settings for forwarding network events via webhooks.
- Security considerations:
auth_token: Stored as a SecretStr to ensure it is masked when the model is printed or logged. Always use get_secret_value() to access it.
verify_ssl: Defaults to True. Disabling this is a security risk as it allows man-in-the-middle attacks. Only disable it for testing with self-signed certificates in controlled environments.
URL: Ensure the url uses https:// for encrypted transport of potentially sensitive network data.
- periodic_interval: float
Time interval in seconds between sends in ‘periodic’ mode. Defaults to 5.0.
- periodic_rate: int
Maximum number of items to send per interval in ‘periodic’ mode. Defaults to 10.