开启RabbitMQ Admin SSL后collectd写入InfluxDB失败:Dataset publish_out_details未找到
Alright, let's break down how to resolve this issue. That error typically pops up because enabling SSL on RabbitMQ's management interface broke the collectd-rabbitmq plugin's ability to fetch and parse data correctly—so collectd ends up not recognizing the expected dataset. Here's what you can do:
1. Update collectd-rabbitmq Plugin SSL Configuration
You need to explicitly configure the plugin to use HTTPS and handle SSL in your collectd.config file. Make sure you're targeting the correct RabbitMQ SSL management port (default is 15671, not the old 15672 HTTP port) and include SSL-related settings:
<Plugin rabbitmq> <Host "your-rabbitmq-host"> Port 15671 User "your-admin-user" Password "your-admin-pass" SSLEnable true # If using a self-signed certificate, disable peer/host verification (adjust if using trusted certs) VerifyPeer false VerifyHost false # If using a trusted CA cert, uncomment and specify the path # CACert "/path/to/your/ca.crt" </Host> </Plugin>
2. Verify RabbitMQ SSL Management Endpoint Access
First, confirm you can reach the RabbitMQ HTTPS API manually using curl—this ensures the SSL setup itself is working:
# Skip cert verification with -k if using self-signed certs curl -k -u your-admin-user:your-admin-pass https://your-rabbitmq-host:15671/api/queues
If this doesn't return valid JSON data, fix your RabbitMQ SSL configuration first (check rabbitmq.config or rabbitmq.conf for correct SSL listener settings, cert paths, etc.).
3. Check collectd's SSL Dependencies
Ensure collectd has the necessary SSL libraries to establish HTTPS connections. Run this command to verify the rabbitmq plugin links against SSL:
ldd /usr/lib/collectd/rabbitmq.so | grep ssl
If no results show up, you may need to reinstall the collectd-rabbitmq package or install missing SSL libraries (like libssl-dev on Debian/Ubuntu or openssl-devel on RHEL/CentOS).
4. Validate collectd's Dataset Definitions
Sometimes broken data fetching can make collectd misinterpret the dataset, or the dataset definition might be missing. Check if publish_out_details exists in your types.db file (usually at /usr/share/collectd/types.db):
grep "publish_out_details" /usr/share/collectd/types.db
If it's missing, add this line to the file:
publish_out_details value:GAUGE:0:U
5. Restart collectd and Monitor Logs
After making changes, restart collectd to apply them:
systemctl restart collectd
Then tail the logs to check for further issues:
journalctl -u collectd -f
If the error is gone, your metrics should start flowing into InfluxDB again.
内容的提问来源于stack exchange,提问作者skongara

