MID Hermes API extension
MID Hermes API is a MID Server extension that enables communication to Hermes via a MID Server.
Send message payloads to a Hermes topic with MID script includes and the MID Hermes Producer API. MID script includes push data to Hermes through a scriptable API interface, so Stream Connect isn't required. Activate the ServiceNow MID Hermes API (com.glide.mid.hermes_api) plugin to use this extension.
Extension context records
- View the status of the extension context.
- Start, stop, and restart the extension context.
- Update parameters.
- View the allowed Hermes topics and edit or create topics.
Statistics
You can view statistics for the MID Hermes API extension by navigating to or going directly to the MID Hermes API Statistics [sys_mid_hermes_api_metric] table.
- Byte count: Number of bytes produced during the collection interval.
- Collection time: Time the collection interval ended.
- Collection interval (seconds): Duration of the collection interval. The default is 60 seconds.
- Message count: Number of messages produced during the collection interval.
- MID Hermes API Extension Context: Name of the extension context record used for producing messages.
- MID Server: Reference to the MID Server executing the extension context.
- Topic: Name of the Hermes topic the extension context is producing messages to.
The metrics for this table are collected in-memory per (extension_context, topic) and aggregated continuously during each 60-second interval. Then they're transmitted as a single batch to ServiceNow, resulting in one database record per unique context-topic combination per interval rather than individual records for each message.
This table has a table cleaner that automatically purges old statistics records based on data retention policies, helping to prevent unbounded table growth.
Access certificates
The mTLS Hermes access certificates contain topic ACLs. When the MID Server generates the CSR, the value in the topics_acl field from the MID Extension Context table is set as the ACL on the CSR. The REST call to sign the CSR passes the MID Extension Context sys_id, so the server can verify that the ACL matches the context configuration.
If the ACL in the Hermes access certificate doesn't match the ACL in the MID Extension Context record, the MID Server automatically retries the verification up to three more times. Between each attempt, the MID Server refetches the latest ACL from the instance. If the ACL still doesn’t match after the final attempt, a REST error is returned and logged.
When the MID extension context starts, the topic ACL string it provides is compared to the one that's part of the mTLS Hermes access certificate. If it's different, a new mTLS certificate with the correct ACL is generated.
If the allowed topics change, business rules automatically restart the MID extension context. When an extension is restarting, producing still works with the old configuration until the new configuration is loaded.
Certificates are valid for seven days. When a certificate is created, a five-day timer starts to re-request the access certificate before it expires.
Configure the MID Hermes API Extension
Configure the MID Hermes API extension to enable the MID Hermes Producer API to produce messages to Hermes via a MID Server.
시작하기 전에
- Role required: kafka_admin
- Deploy and start a MID Server.
- Activate the ServiceNow MID Hermes API (com.glide.mid.hermes_api) plugin.