library/roles/mongodb-org-3.2, library/roles/mongodb-org-3: Enable ganglia authentication against mongo.
d4science-ghn-cluster/group_vars/mongo_cluster_prod/ganglia.yml: Enable authentication.
This commit is contained in:
parent
4067c73b99
commit
24e7fe23e7
|
@ -23,3 +23,8 @@ mongodb_allowed_hosts:
|
|||
mongodb_cluster_enabled: False
|
||||
mongodb_replicaset: storagedev
|
||||
mongodb_replica_keyfile: '{{ mongodb_dbpath }}/replica_keyfile'
|
||||
|
||||
mongodb_ganglia_auth_enabled: False
|
||||
mongodb_ganglia_db: admin
|
||||
mongodb_ganglia_auth_mechanism: MONGODB-CR
|
||||
# User and password are stored in the variables mongo_monitoring_u and mongo_monitoring_pwd
|
||||
|
|
|
@ -3,10 +3,18 @@ modules {
|
|||
name = "mongodb"
|
||||
language = "python"
|
||||
param server_status {
|
||||
{% if mongodb_ganglia_auth_enabled %}
|
||||
value = "mongo --quiet --authenticationMechanism {{ mongodb_ganglia_auth_mechanism }} -u {{ mongo_monitoring_u }} -p {{ mongo_monitoring_pwd }} --eval 'printjson(db.serverStatus())' {{ mongodb_ganglia_db }}"
|
||||
{% else %}
|
||||
value = "mongo --quiet --eval 'printjson(db.serverStatus())'"
|
||||
{% endif %}
|
||||
}
|
||||
param rs_status {
|
||||
{% if mongodb_ganglia_auth_enabled %}
|
||||
value = "mongo --quiet --authenticationMechanism {{ mongodb_ganglia_auth_mechanism }} -u {{ mongo_monitoring_u }} -p {{ mongo_monitoring_pwd }} --eval 'printjson(rs.status())' {{ mongodb_ganglia_db }}"
|
||||
{% else %}
|
||||
value = "mongo --quiet --eval 'printjson(rs.status())'"
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,3 +23,9 @@ mongodb_allowed_hosts:
|
|||
mongodb_cluster_enabled: False
|
||||
mongodb_replicaset: storagedev
|
||||
mongodb_replica_keyfile: '{{ mongodb_dbpath }}/replica_keyfile'
|
||||
|
||||
mongodb_ganglia_auth_enabled: False
|
||||
mongodb_ganglia_db: admin
|
||||
mongodb_ganglia_auth_mechanism: MONGODB-CR
|
||||
# User and password are stored in the variables mongo_monitoring_u and mongo_monitoring_pwd
|
||||
|
||||
|
|
|
@ -3,10 +3,18 @@ modules {
|
|||
name = "mongodb"
|
||||
language = "python"
|
||||
param server_status {
|
||||
{% if mongodb_ganglia_auth_enabled %}
|
||||
value = "mongo --quiet --authenticationMechanism {{ mongodb_ganglia_auth_mechanism }} -u {{ mongo_monitoring_u }} -p {{ mongo_monitoring_pwd }} --eval 'printjson(db.serverStatus())' {{ mongodb_ganglia_db }}"
|
||||
{% else %}
|
||||
value = "mongo --quiet --eval 'printjson(db.serverStatus())'"
|
||||
{% endif %}
|
||||
}
|
||||
param rs_status {
|
||||
{% if mongodb_ganglia_auth_enabled %}
|
||||
value = "mongo --quiet --authenticationMechanism {{ mongodb_ganglia_auth_mechanism }} -u {{ mongo_monitoring_u }} -p {{ mongo_monitoring_pwd }} --eval 'printjson(rs.status())' {{ mongodb_ganglia_db }}"
|
||||
{% else %}
|
||||
value = "mongo --quiet --eval 'printjson(rs.status())'"
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue