First of all, sorry for my english. I started to use Solace prometheus exporter from solacecommunity. I’am a beginner with all of these things (Solace included).
We use docker-compose to start Solace-broker:
solace-broker:
image: solace/solace-pubsub-standard:9.9.0.23
container_name: solace-broker
# For details about default configuration, see:
# Default Configuration for Software Event Brokers
environment:
- username_admin_globalaccesslevel=xxx
- username_admin_password=xxx
ports:
- 55555:55555 # Solace Message Format (SMF)
- 1883:1883 # MQTT (‘default’ VPN)
- 8883:8883 # MQTT TLS / SSL(‘default’ VPN)
This line should help me to link exporter with my broker SOLACE_SCRAPE_URI=http://[ip-of-my-broker]:1883 (here for MQTT (‘default’ VPN)).
My questions are: why there is 3 ports ? What’s the difference ? How could I set SOLACE_SCRAPE_URI for all these ports ?
Because here is my issue:
I have solace_up{error=“”} 1for solace-vpn-det but solace_up{error=“Get "http://[ip-of-my-broker]:1883/SEMP": EOF”} 0 for others (like solace-broker-std).
Well maybe because i set 1883 for SOLACE_SCRAPE_URI
Our purpose is to monitor MQTT broker status.
I know this question may be so stupid, but I would like to improve on these things.
Your first question: Why are there so many ports ?
Solace PubSub+ can handle many protocols at the same time - you can even publish with protocal 1 and subscribe with protocol 2… and all that protocols need different ports.
For example: You can publish with SMF on port 55555 and consume your messages with MQTT over TLS on port 8883.
55555 is the default port for the Solace specific messaging format (called SMF). On our homepage there are client-libraries for different programming languages available for SMF.
1883 is the standard port for plain text MQTT.
8883 is the standard port for MQTT over TLS.
Your 2nd question: What does the error from the Solace prometheus exporter mean ?
Solace brokers have an option to configure and monitor things inside the broker. For this, protocols named “SEMP” and “SEMPv2” are used. Both protocols are HTTP based, both protocols are not used for messaging, but only for managing (conifguring and monitoring) the broker.
For that you need a different service inside the broker, most often available on port 80 (http plaintext) or 1943 (https). If you set this as your scrape URI that will work.
Feel free to ask if you have any additional questions.
Let’s check:
Can you access (with curl or wget or browser) http://[broker-ip]:8080 ?
If not, please try:
docker exec -it solace cli
(inside cli): show service
There are all services and ports inside the container listed and we expect something like:
...
Service TP S C R VRF MsgVpn Port A O Failed Reason
---------- --- ----- ----- --------------- ----- --- --------------------------
SEMP TCP N - - Mgmt 8080 U U
SEMP TCP Y - - Mgmt 1943 U U
Import here:
There is “U U” in the line with “SEMP” and “TCP” and “N” (N= no TLS).
What is port number listed here ?
Please ensure that you have some port mapping in the docker run command to that port.
Here what i have. Hope you can read it. The curl seems working.
Trying [solace-broker]:8080…
TCP_NODELAY set
Connected to [solace-broker] ([solace-broker]) port 8080 (#0)
GET / HTTP/1.1
Host: [solace-broker]:8080
User-Agent: curl/7.68.0
Accept: /