parsedmarc.elastic
🔗
AlreadySaved
🔗
Bases: ValueError
Raised when a report to be saved matches an existing report
ElasticsearchClient
🔗
ElasticsearchClient(
hosts: str | list[str],
use_ssl: bool = False,
ssl_cert_path: str | None = None,
username: str | None = None,
password: str | None = None,
api_key: str | None = None,
timeout: float = 60.0,
index_suffix: str | None = None,
index_prefix: str = "",
monthly_indexes: bool = True,
number_of_shards: int = 1,
number_of_replicas: int = 0,
)
PARAMETER | DESCRIPTION |
---|---|
hosts |
A single hostname or URL, or list of hostnames or URLs |
use_ssl |
Use a HTTPS connection to the server
TYPE:
|
ssl_cert_path |
Path to the certificate chain
TYPE:
|
username |
The username to use for authentication
TYPE:
|
password |
The password to use for authentication
TYPE:
|
api_key |
The Base64 encoded API key to use for authentication
TYPE:
|
timeout |
Timeout in seconds
TYPE:
|
index_suffix |
Suffix to add to index names
TYPE:
|
monthly_indexes |
Use monthly indexes instead of daily indexes
TYPE:
|
number_of_shards |
The number of shards to use in the index
TYPE:
|
number_of_replicas |
The number of replicas to use in the index
TYPE:
|
create_index
🔗
create_index(name: str) -> None
Create Elasticsearch indexe
PARAMETER | DESCRIPTION |
---|---|
name |
index name
TYPE:
|
get_index_name
🔗
save_aggregate_report_to_elasticsearch
🔗
save_aggregate_report_to_elasticsearch(
report: AggregateReport,
) -> None
Saves a parsed DMARC aggregate report to ElasticSearch
PARAMETER | DESCRIPTION |
---|---|
report |
A parsed forensic report
TYPE:
|
save_forensic_report_to_elasticsearch
🔗
save_forensic_report_to_elasticsearch(
report: ForensicReport,
) -> None
Save a parsed DMARC forensic report to ElasticSearch
PARAMETER | DESCRIPTION |
---|---|
report |
A parsed forensic report
TYPE:
|