EXPORTER objectEXPORTER objects{
"type": "webdav",
"fail_strategy": "block",
"max_retries": 7,
"backoff_seconds": 30
}type may be one of the following: webdav, ftp, sftpfail_strategy describes, what to do, if current file cannot be exported for any reason (state::last_error field is set accordingly in such cases)
block - keep trying to export the file until it succeeds every backoff_seconds secondsno_retry - discard the file after the first unsuccessful attemptretry - make max_retries attempts to export the file every backoff_seconds seconds, discard it afterwardsmax_retries works only with retry strategy; 1 <= max_retries <= 10backoff_seconds works only with block or retry strategies; 1 <= backoff_seconds <= 60In case consumer queue size limit is hit, it will accept new items, discarding the oldest ones, making it a circular queue.
WEBDAV_EXPORTER object{
"common": {},
"server": "https://customer-site.com/webdav/",
"username": "customer",
"password": "qwerty",
"strict_ssl": true
}username and password are optional; if there are no credentials, they just should not be sent; they also have a special update mechanic:
username and password are already set in the config, it is allowed not to send password when updating the configuration; the stored password will be used in this case; however, it’s still necessary to send a username, if one wants to keep the credentialsstrict_ssl - set to true if SSL certificate is required to be thoroughly checked, not allowing self-signed certificates, for exampleFTP_EXPORTER object{
"common": {},
"server": "ftp://customer-site.com/webdav/",
"username": "customer",
"password": "qwerty"
}SFTP_EXPORTER object - DISABLED{
"common": {},
"server": "sftp://customer-site.com/webdav/",
"username": "customer",
"password": "qwerty",
"strict_ssl": true
}strict_ssl - set to true if SSL certificate is required to be thoroughly checked, not allowing self-signed certificates, for examplePath: /consumers/file_exporter/state
Method: GET
Response:
{
"time": 1594910835,
"uptime": 13943,
"commit_id": "505d091",
"consumer":
{
"currently_exported_file": "/data/captures/my_file.pcapng",
"last_error": "403 error when exporting the file",
"last_error_ts": 1654378594
}
}consumer:
currently_exported_file - path to file, which is currently being exportedlast_error - last error, which happened during the consumption of a file/consumers/file_exporter/configGETEXPORTER object:
password set/consumers/file_exporter/configPUTEXPORTER objectmessage-data object