Media types
Mediatypes can be managed by navigating to Administration > Mediatypes. It displays a list with all configured media types and let’s you create new ones.
Create a media type
To create a new media type click the blue plus:
- Name: Specify the name of the media type.
- Company: Select the company in which the media type will be available.
- Base type: Choose from the three available base types: Email, SCP, or Kafka.
After providing the necessary details, click Create. The newly created media type will be added to the list of media types.
Media type configuration
You can access its configuration by clicking the card.
Email configuration
In the case of delivering reports via Email, you will need to provide the following information:
- Company: The company for which the media type is created. This cannot be changed.
- Mediatype: Base type, which is
Email
. This also cannot be changed. - Name: Specify a
name
for this media type. - Sender email address: Enter the
email address
used to send emails. - Email server address: Provide the
FQDN
orIP address
of the mail server. - Email server Port: Typically, this is either
25
or587
, depending on your mail server’s configuration. - Email server authentication: Enable this option if authentication is required to connect to the mail server.
- Email server Username: Enter the
username
to use for mail server authentication. - Email server Password: Provide the
password
for mail server authentication. - Email Subject: Include any
static text
you want in the email header. - Email Body: Add any
static text
you want in the email body.
SCP configuration
When reports are delivered via SCP to a remote server, SSH access to the target server is required. This method also allows you to execute a script or command after the delivery is complete.
- Company: The company for which the media type is created. This setting cannot be changed.
- Mediatype: Base type, which is
SCP
. You cannot change this setting. - Name: Specify a
name
for this media type. - Host: Enter the
FQDN
orIP
address of the remote server. - Port: Typically, the port for SSH access is
22
. - Username: Provide the
username
to use for SSH access to the remote server. - SSH-Key: Include the
public key
of the given user for authentication. - Run script after delivery: Specify whether you want to run the command given by the script after the report delivery is complete.
- Script: If you choose to run a script, enter the
script
orcommand
to execute.
s3 configuration
It is possible to use an external s3 buckets for the media delivery:
- Name: The name of the media type.
- Object storage URL: The URL of the object storage that should be used.
- Bucket name: The name of the bucket the deliveries will be stored in.
- Access key: The access key name to use for authentication with the storage provider.
- Secret key: The secret key to use for authentication with the storage provider.
- Require TLS: A toggle to configure if TLS is required or not.
Kafka configuration
When reports are sent to a Kafka server:
- Company: The company for which the media type is created. This setting cannot be changed.
- Mediatype: Base type, which is
Kafka
. You cannot change this setting. - Name: Provide a
name
for this media type. - Kafka server address: Enter the
address
of the Kafka broker you want to connect to. This should be theFQDN
orIP address
of the Kafka broker. - Kafka server port: Typically, the port for the Kafka broker connection is
9092
. - Partition: Specify the
partition
on the Kafka broker to which the reports should be sent. - Kafka topic: Indicate the
topic
on the Kafka broker where the reports should be sent. - Application Name: You can include an
application name
to be embedded in the message sent to the Kafka broker. - Enable Authentication: Choose whether to use authentication based on certificates.
- Client Certificate: If you enable authentication, provide the
client certificate
in PEM format. - Private Key: This is the private key associated with the
client certificate
and should also be in PEM format. - CA Certificate: Include the
CA certificate
in PEM format. - Skip certificate validation: Decide whether to verify the Kafka server’s certificate.
Kafka message structure used by DataForge for report delivery
type Message struct {
ApplicationName string `json:"applicationName"` // name of the application sending the message
Type string `json:"type"` // type of this message (in this case 'report')
ContentType string `json:"contentType"` // MIME-Type of the enclosed report
ContentEncoding string `json:"contentEncoding"` // Encoding of the enclosed report
Version string `json:"version"` // format version (currently 1.0)
Hash string `json:"hash"` // hash of the enclosed data
Data string `json:"data"` // the actual report in json
}
Delete media type
Open the context menu and click delete.