Dear Zabbix support, we are facing the following situation :
- we have a MongoDB replica-set configured with TLS but the authentication mechanism is SCRAM-SHA-256
- we want to monitor the MongoDB nodes using the zabbix-agent2 MongoDB plugin
- the plugin is not taking the URI parameters in account when setting up the SSL context
- when configuring the plugin with the following configuration file :
================================================== ================================================== ====================
Plugins.MongoDB.System.Path=/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb
Plugins.MongoDB.Sessions.mongodbI.Uri=tcp://REDACTED:27017/admin?authMechanism=SCRAM-SHA-256&authSource=admin&appName=zabbix-agent2
Plugins.MongoDB.Sessions.mongodbI.TLSConnect=verif y_full
Plugins.MongoDB.Sessions.mongodbI.TLSCAFile=/var/lib/tls/ca.pem
================================================== ================================================== ====================
we get the following error :
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
failed to execute direct exporter task for key 'mongodb.ping["REDACTED","zabbix_mon","REDACTED"]'
error: 'Invalid configuration: missing TLS certificate file uri tcp://REDACTED:27017/admin?authMechanism=SCRAM-SHA-256&authSource=admin&appName=zabbix-agent2, with session REDACTED
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hence the questions:
- are we doing something wrong or is it not possible to use SCRAM-SHA-256 authentication when requiring TLS ?
- shouldn't the plugin respect the parameters passed in the URI and give them precedence over the settings in the configuration file ?
- we have a MongoDB replica-set configured with TLS but the authentication mechanism is SCRAM-SHA-256
- we want to monitor the MongoDB nodes using the zabbix-agent2 MongoDB plugin
- the plugin is not taking the URI parameters in account when setting up the SSL context
- when configuring the plugin with the following configuration file :
================================================== ================================================== ====================
Plugins.MongoDB.System.Path=/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb
Plugins.MongoDB.Sessions.mongodbI.Uri=tcp://REDACTED:27017/admin?authMechanism=SCRAM-SHA-256&authSource=admin&appName=zabbix-agent2
Plugins.MongoDB.Sessions.mongodbI.TLSConnect=verif y_full
Plugins.MongoDB.Sessions.mongodbI.TLSCAFile=/var/lib/tls/ca.pem
================================================== ================================================== ====================
we get the following error :
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
failed to execute direct exporter task for key 'mongodb.ping["REDACTED","zabbix_mon","REDACTED"]'
error: 'Invalid configuration: missing TLS certificate file uri tcp://REDACTED:27017/admin?authMechanism=SCRAM-SHA-256&authSource=admin&appName=zabbix-agent2, with session REDACTED
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hence the questions:
- are we doing something wrong or is it not possible to use SCRAM-SHA-256 authentication when requiring TLS ?
- shouldn't the plugin respect the parameters passed in the URI and give them precedence over the settings in the configuration file ?
bug reports can still be submitted..
Comment