i dont know why, i can run the script once, and cannot run latter
root@web-srv2:/opt/rocketchat_mongoDB_monitoring-main# ll /var/lib/node_exporter/
total 36
drwxr-xr-x 2 root root 4096 Jun 6 10:18 ./
drwxr-xr-x 31 root root 4096 Jun 6 10:18 ../
-rw-r--r-- 1 root root 21 Jun 6 10:18 away_users.prom
-rw-r--r-- 1 root root 20 Jun 6 10:18 busy_users.prom
-rw-r--r-- 1 root root 26 Jun 6 10:18 offline_users.prom
-rw-r--r-- 1 root root 23 Jun 6 10:18 online_users.prom
-rw-r--r-- 1 root root 19 Jun 6 10:18 total_rooms.prom
-rw-r--r-- 1 root root 30 Jun 6 10:18 total_sent_msgs.prom
-rw-r--r-- 1 root root 34 Jun 6 10:18 total_uploade_docs.prom
root@web-srv2:/opt/rocketchat_mongoDB_monitoring-main# python3 rocketchat_db_query.py
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pymongo/common.py", line 784, in get_validated_options
value = validator(opt, value)
File "/usr/local/lib/python3.10/dist-packages/pymongo/common.py", line 159, in raise_config_error
raise ConfigurationError("Unknown option %s" % (key,))
pymongo.errors.ConfigurationError: Unknown option replsetname
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/rocketchat_mongoDB_monitoring-main/rocketchat_db_query.py", line 176, in
main()
File "/opt/rocketchat_mongoDB_monitoring-main/rocketchat_db_query.py", line 156, in main
onlineUsers = _countOnlineUsers()
File "/opt/rocketchat_mongoDB_monitoring-main/rocketchat_db_query.py", line 110, in _countOnlineUsers
QUERY = _mongoConnection("USERS").count_documents({"status": "online"}) #Count Online Users
File "/opt/rocketchat_mongoDB_monitoring-main/rocketchat_db_query.py", line 92, in _mongoConnection
MONGO_CLIENT = MongoClient(MONGODB_URI)
File "/usr/local/lib/python3.10/dist-packages/pymongo/mongo_client.py", line 704, in init
res = uri_parser.parse_uri(
File "/usr/local/lib/python3.10/dist-packages/pymongo/uri_parser.py", line 511, in parse_uri
options.update(split_options(opts, validate, warn, normalize))
File "/usr/local/lib/python3.10/dist-packages/pymongo/uri_parser.py", line 348, in split_options
options = validate_options(options, warn)
File "/usr/local/lib/python3.10/dist-packages/pymongo/uri_parser.py", line 306, in validate_options
return get_validated_options(opts, warn)
File "/usr/local/lib/python3.10/dist-packages/pymongo/common.py", line 787, in get_validated_options
earnings.warn(str(exc))
NameError: name 'earnings' is not defined. Did you mean: 'warnings'?
root@web-srv2:/opt/rocketchat_mongoDB_monitoring-main#