Prozzie has capability to listen Aerohive Webhooks to send received data to kafka. These are possible thanks to Kafka Connect Aerohive Connector.
Requirements
To use aerohive client you need a trusted HTTP server, Prozzie can’t provide you an HTTPS server, so you need an API-Gateway or reverse-proxy to forward HTTPS petitions to Aerohive client port.
You could use Traefik or Kong for this purpose and Let’s Encrypt certificate authority. Next, you can see an example of how Aerohive connector works with Traefik:
- You need configure in your HiveManager a Webhook with a
POST Url
andAccess Token
. - In
traefik
you need configureLet's Encrypt
certificate and forward petitions to/v1/data/*
endpoint. - You must provide to
Aerohive Connetor
theAccess Token
to verify the petitions. - You will receive your data If everything is right in your kafka’s topic.
Interactive script
You can run prozzie config setup aerohive
to interactively configure one aerohive connector. You will be asked for the next variables, that can’t have any default:
- aerohive__access_token
- Access token to validate webhook callbacks
However, there are some others “hidden” variables that configure the connector. They will be output at the end of the interactive setup, and you can reuse them following the Advanced configuration.
Advanced configuration
To configure Aerohive you can use kcli
tool.
aerohive.properties
# Connector's Name
name=aerohive
# Connector's Class
connector.class=io.wizzie.kafka.connect.aerohive.WebhookSourceConnector
# Max number of tasks (only 1 allowed)
tasks.max=1
# Key converter to kafka
key.converter=org.apache.kafka.connect.storage.StringConverter
# Value converter to kafka
value.converter=org.apache.kafka.connect.storage.StringConverter
# Connector's client ID
aerohive.client_id=aerohive-webhook
# Aerohive Webhook token to verified requested data
aerohive.access_token=aerohive_secret_access_token
# Message processor
message_processor_class=io.wizzie.kafka.connect.aerohive.processor.StringProcessor
You need to configure a aerohive.properties
file with your property:
- aerohive.access_token
- Access token to validate webhook callbacks
When you configure the aerohive.properties
file you need to create the connector:
prozzie kcli create aerohive-connector < aerohive.properties
You can check that messages are properly delivered using prozzie kafka consume <your-aerohive-topic>