diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..31a08be
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Vasily Petrushin, Sunwind, Moscow
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..94ce458
--- /dev/null
+++ b/README.md
@@ -0,0 +1,94 @@
+# mongodb-zabbix-templates
+
+#Zabbix templates for mongodb monitoring
+
+The main tasks of monitoring for us:
+
+1. Watch and notify the support team if mongodb instances is not running or not reachable
+2. Watch a basic mongodb and mongos opcounters
+3. Watch and notify for Mongodb Replicasets health
+4. Watch DiskIO counters - it runs well with outstanding third party Iostat-Disk-Utilization-Template (https://github.com/lesovsky/zabbix-extensions/tree/master/files/iostat)
+5. Provide easy-to-use and easy-to-understand user view for staff.
+
+Technically, for fine mongodb performance tuning you need much more information than provides this templates, but its harder to
+collect, store and visualize with Zabbix, and anyway it would be better to use specially designed mongodb tools.
+Google it for more information.
+
+This package contains 3 templates for monitoring mongodb instances (Mongo-DB template), mongos instance (Mongos template) and replicaset health (Mongo-RS Health template).
+By customising your hosts configurations with this templates you can monitor lagre mongodb clusters. For us it monitors 10 mongodb instances in sharded 5 big replicasets, 4 instances of small metadata database, config database replicaset, 5 mongos routers and backup server.
+
+##How to install Mongo-DB template
+
+Mongo-DB template is used to collect the basic mongodb server opcounters and notify if the instance is gone.
+
+Server requirements:
+Ubuntu 14.04 (tested, but should work on any linux, Centos 6,7, Ubuntu 12.04, 16.04, 18.04 etc.)
+Zabbix server 2.4 - 4.0 (tested, but should work with any Zabbix 2.x)
+Latest mongodb-org-tools and mongodb-org-shell linux packages installed
+
+1. Downoad package from github.
+2. Import xml templates to Zabbix server via browser
+Configuration -> Templates -> Import template
+3. Upload \*.py files to zabbix server, put it to external scrips folder (/usr/lib/zabbix/externalscrips for my server), and
+chown +x mongo\*.py
+4. Install on zabbix server required python modules via command line
+
+sudo pip install pymongo
+sudo pip install py-zabbix
+
+5. Navigate to hosts configuration in zabbix server and add Mongo-DB template to host with mongodb instance.
+6. In Macros tab add the following data
+
+{$MONGODB_HOSTNAME} IP or DNS name of interface used by mongodb instance
+{$MONGODB_USER} User name
+{$MONGODB_PASS} Password
+{$MONGODB_PORT} Port used by mongodb instance
+{$MONGODB_ZABBIX_NAME} Server hostname, as it registered in zabbix (I use two different interfaces for each mongodb server, mongodb instance is using one, other services including zabbix agent - another).
+
+
+In a few minutes it starts to collect data. See the Misc: Data collector in zabbix latest data for easy debug.
+
+For Mongo-DB zabbix graphs go to Monitoring -> Graphs, then select the host with mongodb instance and select Mongo-DB Opcounters and Mongo-DB Network IO graphs. The best way to use this data by your team is to compose special zabbix screens with this graphs with all your servers. How to do this see https://www.zabbix.com/documentation/2.4/manual/config/visualisation/screens
+
+##How to install Mongos template
+
+Mongos template is used to collect the basic mongos server opcounters and notify if the instance is gone.
+
+In case you run mongos instance on the same hardware with any mongodb instance and have the same hostname, user and pass Mongos template will use the Macros data from previously configured Mongo-DB template. You have to do only two steps to get Mongos template running.
+1. Navigate to hosts configuration in zabbix server and add Mongos template to host with mongos instance.
+2. In Macros tab add the following data
+{$MONGOS_PORT} Port used by mongodb instance
+In case the mongos instance is running on dedicated hardware or VM you have to add in Macros tab the following data
+{$MONGODB_HOSTNAME} IP or DNS name of interface used by mongodb instance
+{$MONGODB_USER} User name
+{$MONGODB_PASS} Password
+{$MONGOS_PORT} Port used by mongodb instance
+{$MONGODB_ZABBIX_NAME} Server hostname, as it registered in zabbix (I use two different interfaces for each mongodb server, mongodb instance is using one, other services including zabbix agent - another).
+
+
+In a few minutes it starts to collect data. See the Mongos Misc: Mongos data collector in zabbix latest data for easy debug.
+
+##How to install Mongo-RS probe template
+
+Mongo-RS probe template is used to watch for replicasets. It watch at entire replicaset, then tries to insert a test record and notify if replicaset or one of replicaset members goes unreachable.
+Create new host in zabbix named like replicaset, for example rs0, then add Mongo-RS template to this host.
+In Macros tab add the Macroses
+
+
+{$MONGO_USER} User
+{$MONGO_PASS} Password
+{$RS_NAME} rs0
+{$RS_STRING} mongo00.domain.com:port,mongo01.domain.com:port,mongo02.domain.com:port
+{$RS_ZABBIX_NAME} rs0
+
+
+See RS data collector in Mongo Replica Set section in zabbix latest data for debug.
+
+## How to monitor more than one mongodb instance
+
+The easiest way to monitor more than one mongodb instance is to create new host in zabbix then add a MongoDB template with different {$MONGODB_PORT}
+
+## Contacts
+
+Vasily Petrushin
+petrushinvs@gmail.com
diff --git a/mongod-db.py b/mongod-db.py
new file mode 100755
index 0000000..549489c
--- /dev/null
+++ b/mongod-db.py
@@ -0,0 +1,172 @@
+#!/usr/bin/python
+#
+from __future__ import print_function
+import sys, getopt
+from pyzabbix import ZabbixMetric, ZabbixSender
+from pymongo import MongoClient
+import time
+import subprocess
+import re
+
+ZBSERVER = 'localhost'
+ZBPORT = 10051
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:],"h:n:p:u:s:")
+except getopt.GetoptError:
+ print ("Usage:\nmongod-db.py -h -n -u -s -p ")
+ sys.exit(2)
+
+for opt, arg in opts:
+ if opt == '-h':
+ mongohost = arg
+ elif opt == '-n':
+ zbhost = arg
+ elif opt == '-p':
+ mongoport = arg
+ elif opt == '-u':
+ muser = arg
+ elif opt == '-s':
+ mpass = arg
+
+arg = "-u " + muser + " -p " + mpass + " -h " + mongohost + ":" + mongoport + " --authenticationDatabase=admin --rowcount 1 --noheaders"
+cmd = ['mongostat', "-u", muser, "-p", mpass, "-h", mongohost + ":" + mongoport, "--authenticationDatabase=admin", "--rowcount", "1", "--noheaders"]
+r = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+out, err = r.communicate()
+res = out + err
+
+#print("DEBUG: STR: " + arg)
+#print("DEBUG: RES: " + res)
+#print("DEBUG: ERR: " + err + str(len(err)))
+
+state = 0
+if len(err) > 0:
+ packet = [ ZabbixMetric(zbhost, 'mongodb_state', state),
+ ZabbixMetric(zbhost, 'mongodb_errstr', err) ]
+ result = ZabbixSender(zabbix_port = ZBPORT, zabbix_server = ZBSERVER).send(packet)
+ print(err)
+ sys.exit(1)
+res = res.rstrip()
+res = res.replace('*','')
+res = re.sub("^ +","",res)
+arr = re.split(" +", res)
+
+def str_to_int(s):
+ m = re.match('(\d+)(\[a-z]|[A-Z])', s)
+ r = re.match('(\d+).(\d+)(\[a-z]|[A-Z])', s)
+ if r:
+ m = r
+ if m:
+ i = int(m.group(1))
+ if m.group(2) == 'k':
+ i = i * 1000
+ elif m.group(2) == 'm':
+ i = i * 1000 * 1000
+ else:
+ try:
+ i = int(s)
+ except:
+ i = 0
+ return i
+
+def str_to_bytes(s):
+ m = re.match('(\d+)(\[a-z]|[A-Z])', s)
+ r = re.match('(\d+).(\d+)(\[a-z]|[A-Z])', s)
+ if r:
+ m = r
+ if m:
+ i = int(m.group(1))
+ if m.group(2) == 'k' or m.group(2) == 'K':
+ i = i * 1024
+ elif m.group(2) == 'm' or m.group(2) == 'M':
+ i = i * 1024 * 1024
+ elif m.group(2) == 'g' or m.group(2) == 'G':
+ i = i * 1024 * 1024 * 1024
+ else:
+ try:
+ i = int(s)
+ except:
+ i = 0
+ return i
+
+if len(arr) < 18:
+ err = 'Unknown error!'
+ packet = [ ZabbixMetric(zbhost, 'mongodb_state', state),
+ ZabbixMetric(zbhost, 'mongodb_errstr', err) ]
+ result = ZabbixSender(zabbix_port = ZBPORT, zabbix_server = ZBSERVER).send(packet)
+ print(err)
+ sys.exit(1)
+
+# Human readable names for better understanding
+insert, query, update, delete, getmore, command, dirty, used, flushes, vsize, resm, qr, ar, netin, netout, conn, rset, repl = arr[:18]
+# Add known opcounters to zabbix packet
+err = 'OK'
+state = 1
+packet = [ ZabbixMetric(zbhost, 'mongodb_state', state),
+ ZabbixMetric(zbhost, 'mongodb_errstr', err) ]
+conn = str_to_int(conn)
+packet.append(ZabbixMetric(zbhost, "mongodb_conn", conn))
+packet.append(ZabbixMetric(zbhost, "mongodb_rs_name", rset))
+packet.append(ZabbixMetric(zbhost, "mongodb_rs_status", repl))
+m = re.match('(\d+)\|(\d+)',ar)
+if m:
+ ar = m.group(1)
+ aw = m.group(2)
+else:
+ ar = 0
+ aw = 0
+packet.append(ZabbixMetric(zbhost, "mongodb_aclients_read", ar))
+packet.append(ZabbixMetric(zbhost, "mongodb_aclients_write", aw))
+vsize = str_to_bytes(vsize)
+packet.append(ZabbixMetric(zbhost, "mongodb_vsize", vsize))
+netin = str_to_bytes(netin)
+packet.append(ZabbixMetric(zbhost, "mongodb_netin", netin))
+netout = str_to_bytes(netout)
+packet.append(ZabbixMetric(zbhost, "mongodb_netout", netout))
+
+# Read saved opcounters from previous check
+try:
+ f = open("/tmp/" + mongohost + "-opcounters")
+ s = f.read()
+ f.close()
+ ts, insert, update, delete, query, getmore, command = s.split(" ")
+except Exception as e:
+ ts, insert, update, delete, query, getmore, command = [1,0,0,0,0,0,0]
+ print(e)
+
+print("History opcounters")
+print(ts, insert, update, delete, query, getmore, command)
+
+# Get serverStatus stats
+try:
+ mo = MongoClient('mongodb://' + muser + ':' + mpass + '@' + mongohost + ':' + mongoport + '/admin', connectTimeoutMS=5000)
+except Exception as e:
+ print ('Can\'t connect to '+mongohost)
+ print ("ERROR:", e)
+ sys.exit(1)
+res = mo.admin.command('serverStatus')
+now = time.time()
+#$zab->send("mongodb_insert", int(($res->{opcounters}->{insert} - $insert)/(($now-$ts)/60)));
+packet.append(ZabbixMetric(zbhost, "mongodb_insert", int((float(res['opcounters']['insert']) - float(insert))/((now - float(ts))/60))))
+packet.append(ZabbixMetric(zbhost, "mongodb_update", int((float(res['opcounters']['update']) - float(update))/((now - float(ts))/60))))
+packet.append(ZabbixMetric(zbhost, "mongodb_delete", int((float(res['opcounters']['delete']) - float(delete))/((now - float(ts))/60))))
+packet.append(ZabbixMetric(zbhost, "mongodb_query", int((float(res['opcounters']['query']) - float(query))/((now - float(ts))/60))))
+packet.append(ZabbixMetric(zbhost, "mongodb_getmore", int((float(res['opcounters']['getmore']) - float(getmore))/((now - float(ts))/60))))
+packet.append(ZabbixMetric(zbhost, "mongodb_command", int((float(res['opcounters']['command']) - float(command))/((now - float(ts))/60))))
+# Total ops since last run (per minute approx)
+total_ops = res['opcounters']['insert'] + res['opcounters']['update'] + res['opcounters']['delete'] + res['opcounters']['query'] + \
+ res['opcounters']['getmore'] + res['opcounters']['command'] - int(insert) - int(update) - int(delete) - int(query) - int(getmore) - int(command)
+packet.append(ZabbixMetric(zbhost, "mongodb_total_ops", total_ops))
+
+# Save opcounters
+try:
+ f = open("/tmp/" + mongohost + "-opcounters", 'w')
+ f.write(str(int(now)) + ' ' + str(res['opcounters']['insert']) + ' ' + str(res['opcounters']['update']) + ' ' + str(res['opcounters']['delete']) + ' ' + \
+ str(res['opcounters']['query']) + ' ' + str(res['opcounters']['getmore']) + ' ' + str(res['opcounters']['command']))
+ f.close()
+except Exception as e:
+ print("Can't update stats!")
+ print(e)
+
+t = ZabbixSender(zabbix_port = ZBPORT, zabbix_server = ZBSERVER).send(packet)
+print(t)
diff --git a/mongod-rs-probe.py b/mongod-rs-probe.py
new file mode 100755
index 0000000..69ad979
--- /dev/null
+++ b/mongod-rs-probe.py
@@ -0,0 +1,146 @@
+#!/usr/bin/python
+#
+
+from __future__ import print_function
+
+import logging
+logging.basicConfig(level = logging.ERROR)
+
+import sys, getopt
+from pyzabbix import ZabbixMetric, ZabbixSender
+
+from pymongo import MongoClient
+from pymongo import ReadPreference
+import time
+
+ZBHOST = 'localhost'
+ZBPORT = 10051
+
+#zbhost = 'rs-raw0'
+
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:],"c:n:r:u:s:")
+except getopt.GetoptError:
+ print ('mongod-rs-probe.py -c -n -u -s -r ')
+ sys.exit(2)
+
+for opt, arg in opts:
+ if opt == '-c':
+ mongostr = arg
+ elif opt == '-n':
+ zbhost = arg
+ elif opt == '-r':
+ replicaSet = arg
+ elif opt == '-u':
+ muser = arg
+ elif opt == '-s':
+ mpass = arg
+
+#mongostr = 'h201.local.sunwind.su:27020,h202.local.sunwind.su:27020'
+#replicaSet = 'rs-raw0'
+#muser = 'sa'
+#mpass = 'qwe123$'
+
+inserted = 0
+connected = 0
+deleted = 0
+mread = 0
+warn = 0
+
+def report_and_exit():
+ packet = [
+ ZabbixMetric(zbhost, 'rs.insert', inserted),
+ ZabbixMetric(zbhost, 'rs.read', mread),
+ ZabbixMetric(zbhost, 'rs.delete', deleted),
+ ZabbixMetric(zbhost, 'rs.connect', connected),
+ ZabbixMetric(zbhost, 'rs.warn', warn),
+ ]
+ # print (warn)
+ result = ZabbixSender(zabbix_port = ZBPORT, zabbix_server = ZBHOST).send(packet)
+ #print (result)
+ exit()
+
+
+def rs_status(rs_):
+# print (rs_.admin.read_preference)
+ wwarn = 0
+ if len(rs_.nodes) < 2:
+ print ('RS '+replicaSet+' status: ERROR')
+ print ('Online nodes:', [i for i in rs_.nodes])
+ wwarn = 1
+ else:
+ res = rs_.admin.command("replSetGetStatus")
+# print (res)
+# print (rs_.nodes)
+# print ('ok:', int(res['ok']))
+ for i in res['members']:
+ print ('name:', i['name'], 'state:', int(i['state']), i['stateStr'], 'health:', int(i['health']))
+ if int(i['health']) != 1 or int(i['state']) == 5:
+ wwarn = 1
+ if wwarn == 1:
+ print ('RS', replicaSet, 'status: WARN!')
+ else:
+ print ('RS', replicaSet, 'status: OK!')
+ return wwarn
+
+#print ('Connecting '+mongostr+'?replicaSet='+replicaSet+'...')
+print ('Replicaset:', replicaSet)
+
+try:
+ rs = MongoClient('mongodb://'+muser+':'+mpass+'@'+mongostr+'/admin?replicaSet='+replicaSet, readPreference='secondaryPreferred',
+ serverSelectionTimeoutMS=5000, connectTimeoutMS=5000)
+except Exception as e:
+ print ('Can\'t connect to replicaset '+mongostr+'?replicaSet='+replicaSet)
+ print ("ERROR:", e)
+ report_and_exit()
+
+connected = 1
+#print ('Connected!')
+#print (rs);
+
+sequence = int (time.time() * 1000)
+#print ('Inserting new seq ' + str(sequence)+'...')
+msg = { 'sequence': sequence }
+try:
+ if replicaSet == 'configReplSet':
+ _id = rs['admin']['rw-test'].insert_one(msg).inserted_id
+ else:
+ _id = rs['rw-test']['rw-test'].insert_one(msg).inserted_id
+except Exception as e:
+# print (type(e))
+# print (e)
+ print ('Replicaset '+replicaSet+" write ERROR:", e)
+ rs_status(rs)
+ report_and_exit()
+
+inserted = 1
+#print ('Sequence inserted')
+if replicaSet == 'configReplSet':
+ rw_test_seq = rs['admin']['rw-test'].find_one({"_id": _id})
+else:
+ rw_test_seq = rs['rw-test']['rw-test'].find_one({"_id": _id})
+
+mread = 1
+
+#print ('Got sequence '+str(rw_test_seq['sequence']))
+try:
+ if sequence == int(rw_test_seq['sequence']):
+ print ('Got right sequence, replicaset '+replicaSet+' UP')
+ else:
+ print ('Got strange sequence, replicaset '+replicaSet+str(rw_test_seq['sequence']))
+except Exception as e:
+ print ('Replicaset '+replicaSet+" read ERROR:", e)
+ rs_status(rs)
+ report_and_exit()
+
+
+if replicaSet == 'configReplSet':
+ rs['admin']['rw-test'].delete_one({"_id": _id})
+else:
+ rs['rw-test']['rw-test'].delete_one({"_id": _id})
+deleted = 1
+
+warn = rs_status(rs)
+report_and_exit()
+
diff --git a/mongos.py b/mongos.py
new file mode 100755
index 0000000..db75a4b
--- /dev/null
+++ b/mongos.py
@@ -0,0 +1,161 @@
+#!/usr/bin/python
+#
+from __future__ import print_function
+import sys, getopt
+from pyzabbix import ZabbixMetric, ZabbixSender
+from pymongo import MongoClient
+import time
+import subprocess
+import re
+
+ZBSERVER = 'localhost'
+ZBPORT = 10051
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:],"h:n:p:u:s:")
+except getopt.GetoptError:
+ print ("Usage:\nmongos.py -h -n -u -s -p ")
+ sys.exit(2)
+
+for opt, arg in opts:
+ if opt == '-h':
+ mongohost = arg
+ elif opt == '-n':
+ zbhost = arg
+ elif opt == '-p':
+ mongoport = arg
+ elif opt == '-u':
+ muser = arg
+ elif opt == '-s':
+ mpass = arg
+
+arg = "-u " + muser + " -p " + mpass + " -h " + mongohost + ":" + mongoport + " --authenticationDatabase=admin --rowcount 1 --noheaders"
+cmd = ['mongostat', "-u", muser, "-p", mpass, "-h", mongohost + ":" + mongoport, "--authenticationDatabase=admin", "--rowcount", "1", "--noheaders"]
+r = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+out, err = r.communicate()
+res = out + err
+
+#print("DEBUG: STR: " + arg)
+#print("DEBUG: RES: " + res)
+#print("DEBUG: ERR: " + err + str(len(err)))
+
+state = 0
+if len(err) > 0:
+ packet = [ ZabbixMetric(zbhost, 'mongos_state', state),
+ ZabbixMetric(zbhost, 'mongos_errstr', err) ]
+ result = ZabbixSender(zabbix_port = ZBPORT, zabbix_server = ZBSERVER).send(packet)
+ print(err)
+ sys.exit(1)
+res = res.rstrip()
+res = res.replace('*','')
+res = re.sub("^ +","",res)
+arr = re.split(" +", res)
+
+def str_to_int(s):
+ m = re.match('(\d+)(\[a-z]|[A-Z])', s)
+ r = re.match('(\d+).(\d+)(\[a-z]|[A-Z])', s)
+ if r:
+ m = r
+ if m:
+ i = int(m.group(1))
+ if m.group(2) == 'k':
+ i = i * 1000
+ elif m.group(2) == 'm':
+ i = i * 1000 * 1000
+ else:
+ try:
+ i = int(s)
+ except:
+ i = 0
+ return i
+
+def str_to_bytes(s):
+ m = re.match('(\d+)(\[a-z]|[A-Z])', s)
+ r = re.match('(\d+).(\d+)(\[a-z]|[A-Z])', s)
+ if r:
+ m = r
+ if m:
+ i = int(m.group(1))
+ if m.group(2) == 'k' or m.group(2) == 'K':
+ i = i * 1024
+ elif m.group(2) == 'm' or m.group(2) == 'M':
+ i = i * 1024 * 1024
+ elif m.group(2) == 'g' or m.group(2) == 'G':
+ i = i * 1024 * 1024 * 1024
+ else:
+ try:
+ i = int(s)
+ except:
+ i = 0
+ return i
+
+if len(arr) < 18:
+ err = 'Unknown error!'
+ packet = [ ZabbixMetric(zbhost, 'mongos_state', state),
+ ZabbixMetric(zbhost, 'mongos_errstr', err) ]
+ result = ZabbixSender(zabbix_port = ZBPORT, zabbix_server = ZBSERVER).send(packet)
+ print(err)
+ sys.exit(1)
+
+# Human readable names for better understanding what do we get and how to deal with it
+insert, query, update, delete, getmore, command, flushes, vsize, resm, flt, qr, ar, netin, netout, conn, rset, repl = arr[:17]
+# Add known opcounters to zabbix packet
+err = 'OK'
+state = 1
+packet = [ ZabbixMetric(zbhost, 'mongos_state', state),
+ ZabbixMetric(zbhost, 'mongos_errstr', err) ]
+conn = str_to_int(conn)
+packet.append(ZabbixMetric(zbhost, "mongos_conn", conn))
+vsize = str_to_bytes(vsize)
+packet.append(ZabbixMetric(zbhost, "mongos_vsize", vsize))
+netin = str_to_bytes(netin)
+packet.append(ZabbixMetric(zbhost, "mongos_netin", netin))
+netout = str_to_bytes(netout)
+packet.append(ZabbixMetric(zbhost, "mongos_netout", netout))
+
+# Read saved opcounters from previous check
+try:
+ f = open("/tmp/" + mongohost + "-mongos-opcounters")
+ s = f.read()
+ f.close()
+ ts, insert, update, delete, query, getmore, command = s.split(" ")
+except Exception as e:
+ ts, insert, update, delete, query, getmore, command = [1,0,0,0,0,0,0]
+ print(e)
+
+print("History opcounters")
+print(ts, insert, update, delete, query, getmore, command)
+
+# Get serverStatus stats
+try:
+ mo = MongoClient('mongodb://' + muser + ':' + mpass + '@' + mongohost + ':' + mongoport + '/admin', connectTimeoutMS=5000)
+except Exception as e:
+ print ('Can\'t connect to '+mongohost)
+ print ("ERROR:", e)
+ sys.exit(1)
+res = mo.admin.command('serverStatus')
+now = time.time()
+#$zab->send("mongos_insert", int(($res->{opcounters}->{insert} - $insert)/(($now-$ts)/60)));
+packet.append(ZabbixMetric(zbhost, "mongos_insert", int((float(res['opcounters']['insert']) - float(insert))/((now - float(ts))/60))))
+packet.append(ZabbixMetric(zbhost, "mongos_update", int((float(res['opcounters']['update']) - float(update))/((now - float(ts))/60))))
+packet.append(ZabbixMetric(zbhost, "mongos_delete", int((float(res['opcounters']['delete']) - float(delete))/((now - float(ts))/60))))
+packet.append(ZabbixMetric(zbhost, "mongos_query", int((float(res['opcounters']['query']) - float(query))/((now - float(ts))/60))))
+packet.append(ZabbixMetric(zbhost, "mongos_getmore", int((float(res['opcounters']['getmore']) - float(getmore))/((now - float(ts))/60))))
+packet.append(ZabbixMetric(zbhost, "mongos_command", int((float(res['opcounters']['command']) - float(command))/((now - float(ts))/60))))
+# Total ops since last run (per minute approx)
+total_ops = res['opcounters']['insert'] + res['opcounters']['update'] + res['opcounters']['delete'] + res['opcounters']['query'] + \
+ res['opcounters']['getmore'] + res['opcounters']['command'] - int(insert) - int(update) - int(delete) - int(query) - int(getmore) - int(command)
+packet.append(ZabbixMetric(zbhost, "mongos_total_ops", total_ops))
+
+# Save opcounters
+try:
+ f = open("/tmp/" + mongohost + "-mongos-opcounters", 'w')
+ f.write(str(int(now)) + ' ' + str(res['opcounters']['insert']) + ' ' + str(res['opcounters']['update']) + ' ' + str(res['opcounters']['delete']) + ' ' + \
+ str(res['opcounters']['query']) + ' ' + str(res['opcounters']['getmore']) + ' ' + str(res['opcounters']['command']))
+ f.close()
+except Exception as e:
+ print("Can't update stats!")
+ print(e)
+
+t = ZabbixSender(zabbix_port = ZBPORT, zabbix_server = ZBSERVER).send(packet)
+print(t)
diff --git a/zbx_Mongo-RS-probe_template.xml b/zbx_Mongo-RS-probe_template.xml
new file mode 100644
index 0000000..73dba77
--- /dev/null
+++ b/zbx_Mongo-RS-probe_template.xml
@@ -0,0 +1,454 @@
+
+
+ 4.0
+ 2018-12-10T15:34:56Z
+
+
+ Sunwind
+
+
+
+
+ rs-probe
+ Mongod RS probe
+
+
+
+ Sunwind
+
+
+
+
+ mongo-rs
+
+
+
+ -
+ RS probe
+ 10
+
+
+ mongod-rs-probe.py[-c, {$RS_STRING}, -n, {$RS_ZABBIX_NAME}, -r, {$RS_NAME}, -u, {$MONGO_USER}, -s, {$MONGO_PASS}]
+ 1m
+ 90d
+ 0
+ 0
+ 4
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ mongo-rs
+
+
+
+
+
+
+ 3s
+
+
+
+ 200
+ 1
+ 0
+
+
+ 0
+ 1
+ 0
+ 0
+
+
+
+ 0
+ 0
+
+
+ -
+ rs.connect
+ 2
+
+
+ rs.connect
+ 0
+ 1w
+ 1w
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ mongo-rs
+
+
+
+
+
+
+ 3s
+
+
+
+ 200
+ 1
+ 0
+
+
+ 0
+ 1
+ 0
+ 0
+
+
+
+ 0
+ 0
+
+
+ -
+ rs.delete
+ 2
+
+
+ rs.delete
+ 0
+ 1w
+ 1w
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ mongo-rs
+
+
+
+
+
+
+ 3s
+
+
+
+ 200
+ 1
+ 0
+
+
+ 0
+ 1
+ 0
+ 0
+
+
+
+ 0
+ 0
+
+
+ -
+ rs.insert
+ 2
+
+
+ rs.insert
+ 0
+ 1w
+ 1w
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ mongo-rs
+
+
+
+
+
+
+ 3s
+
+
+
+ 200
+ 1
+ 0
+
+
+ 0
+ 1
+ 0
+ 0
+
+
+
+ 0
+ 0
+
+
+ -
+ rs.read
+ 2
+
+
+ rs.read
+ 0
+ 1w
+ 1w
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ mongo-rs
+
+
+
+
+
+
+ 3s
+
+
+
+ 200
+ 1
+ 0
+
+
+ 0
+ 1
+ 0
+ 0
+
+
+
+ 0
+ 0
+
+
+ -
+ rs.warn
+ 2
+
+
+ rs.warn
+ 0
+ 1w
+ 2w
+ 0
+ 3
+
+
+
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ mongo-rs
+
+
+
+
+
+
+ 3s
+
+
+
+ 200
+ 1
+ 0
+
+
+ 0
+ 1
+ 0
+ 0
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+ {rs-probe:mongod-rs-probe.py[-c, {$RS_STRING}, -n, {$RS_ZABBIX_NAME}, -r, {$RS_NAME}, -u, {$MONGO_USER}, -s, {$MONGO_PASS}].strlen()}>1 and ({rs-probe:rs.connect.avg(300)}=0 or {rs-probe:rs.connect.nodata(600)}=1)
+ 0
+
+ RS probe error connect
+ 0
+
+
+ 0
+ 4
+
+ 0
+ 0
+
+
+
+
+ {rs-probe:mongod-rs-probe.py[-c, {$RS_STRING}, -n, {$RS_ZABBIX_NAME}, -r, {$RS_NAME}, -u, {$MONGO_USER}, -s, {$MONGO_PASS}].strlen()}>1 and {rs-probe:rs.insert.avg(300)}=0
+ 0
+
+ RS probe error insert
+ 0
+
+
+ 0
+ 4
+
+ 0
+ 0
+
+
+
+
+ {rs-probe:rs.warn.avg(300)}=1 and {rs-probe:mongod-rs-probe.py[-c, {$RS_STRING}, -n, {$RS_ZABBIX_NAME}, -r, {$RS_NAME}, -u, {$MONGO_USER}, -s, {$MONGO_PASS}].strlen()}>1
+ 0
+
+ RS probe warn
+ 0
+
+
+ 0
+ 2
+
+ 0
+ 0
+
+
+
+
+ {rs-probe:mongod-rs-probe.py[-c, {$RS_STRING}, -n, {$RS_ZABBIX_NAME}, -r, {$RS_NAME}, -u, {$MONGO_USER}, -s, {$MONGO_PASS}].strlen()}>1
+ 0
+
+ TEST
+ 0
+
+
+ 1
+ 0
+
+ 0
+ 0
+
+
+
+
+
diff --git a/zbx_MongoDB_template.xml b/zbx_MongoDB_template.xml
new file mode 100644
index 0000000..f0126df
--- /dev/null
+++ b/zbx_MongoDB_template.xml
@@ -0,0 +1,988 @@
+
+
+ 2.0
+ 2016-01-26T07:52:20Z
+
+
+ Sunwind
+
+
+
+
+ Mongo-DB
+ Mongo-DB
+ Mongo-DB Basic DB opcounters
+
+
+ Sunwind
+
+
+
+
+ Misc
+
+
+ Network
+
+
+ Opcounters
+
+
+ RAM
+
+
+
+ -
+ Data collector
+ 10
+
+ 0
+
+ mongod-db.py[ -u, {$MONGODB_USER}, -s, {$MONGODB_PASS}, -h, {$MONGODB_HOSTNAME}, -p, {$MONGODB_PORT}, -n, {$MONGODB_ZABBIX_NAME} ]
+ 60
+ 90
+ 365
+ 0
+ 4
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Misc
+
+
+
+
+
+ -
+ Misc: Error String
+ 2
+
+ 0
+
+ mongodb_errstr
+ 0
+ 90
+ 365
+ 0
+ 4
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Misc: Error String
+ 0
+
+
+ Misc
+
+
+
+
+
+ -
+ Misc: Replicaset Name
+ 2
+
+ 0
+
+ mongodb_rs_name
+ 0
+ 90
+ 365
+ 0
+ 4
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Misc
+
+
+
+
+
+ -
+ Misc: RS Status
+ 2
+
+ 0
+
+ mongodb_rs_status
+ 0
+ 90
+ 365
+ 0
+ 4
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Misc
+
+
+
+
+
+ -
+ Misc: State
+ 2
+
+ 0
+
+ mongodb_state
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Misc: State
+ 0
+
+
+ Misc
+
+
+
+
+
+ -
+ Network: Connections
+ 2
+
+ 0
+
+ mongodb_conn
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Network: Connections
+ 0
+
+
+ Network
+
+
+
+
+
+ -
+ Network: Inbound traffic
+ 2
+
+ 0
+
+ mongodb_netin
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Network: Inbound traffic
+ 0
+
+
+ Network
+
+
+
+
+
+ -
+ Network: Outbound traffic
+ 2
+
+ 0
+
+ mongodb_netout
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Network: Outbound traffic
+ 0
+
+
+ Network
+
+
+
+
+
+ -
+ Opcounters: Commands per second
+ 2
+
+ 0
+
+ mongodb_command
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Opcounters: Commands per second
+ 0
+
+
+ Opcounters
+
+
+
+
+
+ -
+ Opcounters: Deletes per second
+ 2
+
+ 0
+
+ mongodb_delete
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Opcounters: Deletes per second
+ 0
+
+
+ Opcounters
+
+
+
+
+
+ -
+ Opcounters: Getmore per second
+ 2
+
+ 0
+
+ mongodb_getmore
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Opcounters: Getmore per second
+ 0
+
+
+ Opcounters
+
+
+
+
+
+ -
+ Opcounters: Inserts per second
+ 2
+
+ 0
+
+ mongodb_insert
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Opcounters: Inserts per second
+ 0
+
+
+ Opcounters
+
+
+
+
+
+ -
+ Opcounters: Queries per second
+ 2
+
+ 0
+
+ mongodb_query
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Opcounters: Queries per second
+ 0
+
+
+ Opcounters
+
+
+
+
+
+ -
+ Opcounters: Total Ops per second
+ 2
+
+ 0
+
+ mongodb_total_ops
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Opcounters: Total Ops per second
+ 0
+
+
+ Opcounters
+
+
+
+
+
+ -
+ Opcounters: Updates per second
+ 2
+
+ 0
+
+ mongodb_update
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Opcounters: Updates per second
+ 0
+
+
+ Opcounters
+
+
+
+
+
+ -
+ RAM: VSize
+ 2
+
+ 0
+
+ mongodb_vsize
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ RAM: VSize
+ 0
+
+
+ RAM
+
+
+
+
+
+
+
+
+
+
+
+ Mongo-DB Basic Screen
+ 2
+ 2
+
+
+ 0
+ 400
+ 300
+ 0
+ 0
+ 1
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+ Mongo-DB Operations
+ Mongo-DB
+
+ 3
+
+
+
+ 0
+ 400
+ 350
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+ Mongo-DB Network IO
+ Mongo-DB
+
+ 3
+
+
+
+ 3
+ 500
+ 100
+ 0
+ 1
+ 1
+ 1
+ 3
+ 0
+ 0
+
+
+ 0
+ 0
+
+ mongodb_vsize
+ Mongo-DB
+
+ 3
+
+
+
+ 3
+ 500
+ 100
+ 1
+ 1
+ 1
+ 1
+ 3
+ 0
+ 0
+
+
+ 0
+ 0
+
+ mongodb_conn
+ Mongo-DB
+
+ 3
+
+
+
+
+
+
+
+
+
+ {Mongo-DB:mongodb_errstr.str(OK)}=0 and {Mongo-DB:mongodb_state.last(#5)}=0
+ MongoDB Error on {HOST.NAME}
+
+ 0
+ 4
+
+ 0
+
+
+
+
+
+ Mongo-DB Network IO
+ 900
+ 300
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 2
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Mongo-DB
+ mongodb_netin
+
+
+
+ 1
+ 2
+ C80000
+ 0
+ 2
+ 0
+ -
+ Mongo-DB
+ mongodb_netout
+
+
+
+
+
+ Mongo-DB Operations
+ 900
+ 300
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 2
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Mongo-DB
+ mongodb_command
+
+
+
+ 1
+ 2
+ C80000
+ 0
+ 2
+ 0
+ -
+ Mongo-DB
+ mongodb_delete
+
+
+
+ 2
+ 2
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Mongo-DB
+ mongodb_getmore
+
+
+
+ 3
+ 2
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Mongo-DB
+ mongodb_insert
+
+
+
+ 4
+ 2
+ 00C8C8
+ 0
+ 2
+ 0
+ -
+ Mongo-DB
+ mongodb_query
+
+
+
+ 5
+ 2
+ 000000
+ 0
+ 2
+ 0
+ -
+ Mongo-DB
+ mongodb_total_ops
+
+
+
+ 6
+ 2
+ EEEE00
+ 0
+ 2
+ 0
+ -
+ Mongo-DB
+ mongodb_update
+
+
+
+
+
+
diff --git a/zbx_Mongos_template.xml b/zbx_Mongos_template.xml
new file mode 100644
index 0000000..d740e61
--- /dev/null
+++ b/zbx_Mongos_template.xml
@@ -0,0 +1,892 @@
+
+
+ 2.0
+ 2016-01-26T07:51:30Z
+
+
+ Sunwind
+
+
+
+
+ Mongos
+ Mongos
+ Mongos Basic DB opcounters
+
+
+ Sunwind
+
+
+
+
+ Mongos Misc
+
+
+ Mongos Network
+
+
+ Mongos Opcounters
+
+
+ Mongos RAM
+
+
+
+ -
+ Mongos Data collector
+ 10
+
+ 0
+
+ mongos.py[ -u, {$MONGODB_USER}, -s, {$MONGODB_PASS}, -h, {$MONGODB_HOSTNAME}, -p, {$MONGOS_PORT}, -n, {$MONGODB_ZABBIX_NAME} ]
+ 60
+ 90
+ 365
+ 0
+ 4
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Mongos Misc
+
+
+
+
+
+ -
+ Mongos Misc: Error String
+ 2
+
+ 0
+
+ mongos_errstr
+ 0
+ 90
+ 365
+ 0
+ 4
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Misc: Error String
+ 0
+
+
+ Mongos Misc
+
+
+
+
+
+ -
+ Mongos Misc: Replicaset Name
+ 2
+
+ 0
+
+ mongos_rs_name
+ 0
+ 90
+ 365
+ 0
+ 4
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Mongos Misc
+
+
+
+
+
+ -
+ Mongos Misc: RS Status
+ 2
+
+ 0
+
+ mongos_rs_status
+ 0
+ 90
+ 365
+ 0
+ 4
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Mongos Misc
+
+
+
+
+
+ -
+ Mongos Misc: State
+ 2
+
+ 0
+
+ mongos_state
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Misc: State
+ 0
+
+
+ Mongos Misc
+
+
+
+
+
+ -
+ Mongos Network: Connections
+ 2
+
+ 0
+
+ mongos_conn
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Network: Connections
+ 0
+
+
+ Mongos Network
+
+
+
+
+
+ -
+ Mongos Network: Inbound traffic
+ 2
+
+ 0
+
+ mongos_netin
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Network: Inbound traffic
+ 0
+
+
+ Mongos Network
+
+
+
+
+
+ -
+ Mongos Network: Outbound traffic
+ 2
+
+ 0
+
+ mongos_netout
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Network: Outbound traffic
+ 0
+
+
+ Mongos Network
+
+
+
+
+
+ -
+ Mongos Opcounters: Commands per second
+ 2
+
+ 0
+
+ mongos_command
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Opcounters: Commands per second
+ 0
+
+
+ Mongos Opcounters
+
+
+
+
+
+ -
+ Mongos Opcounters: Deletes per second
+ 2
+
+ 0
+
+ mongos_delete
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Opcounters: Deletes per second
+ 0
+
+
+ Mongos Opcounters
+
+
+
+
+
+ -
+ Mongos Opcounters: Getmore per second
+ 2
+
+ 0
+
+ mongos_getmore
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Opcounters: Getmore per second
+ 0
+
+
+ Mongos Opcounters
+
+
+
+
+
+ -
+ Mongos Opcounters: Inserts per second
+ 2
+
+ 0
+
+ mongos_insert
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Opcounters: Inserts per second
+ 0
+
+
+ Mongos Opcounters
+
+
+
+
+
+ -
+ Mongos Opcounters: Queries per second
+ 2
+
+ 0
+
+ mongos_query
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Opcounters: Queries per second
+ 0
+
+
+ Mongos Opcounters
+
+
+
+
+
+ -
+ Mongos Opcounters: Total Ops per second
+ 2
+
+ 0
+
+ mongos_total_ops
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Opcounters: Total Ops per second
+ 0
+
+
+ Mongos Opcounters
+
+
+
+
+
+ -
+ Mongos Opcounters: Updates per second
+ 2
+
+ 0
+
+ mongos_update
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos Opcounters: Updates per second
+ 0
+
+
+ Mongos Opcounters
+
+
+
+
+
+ -
+ Mongos RAM: VSize
+ 2
+
+ 0
+
+ mongos_vsize
+ 0
+ 90
+ 365
+ 0
+ 3
+
+
+ 0
+
+
+ 0
+ 0
+
+ 0
+
+ 1
+
+
+
+ 0
+ 0
+
+
+
+
+
+ Mongos RAM: VSize
+ 0
+
+
+ Mongos RAM
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {Mongos:mongos_errstr.str(OK)}=0 and {Mongos:mongos_state.last(#5)}=0
+ Mongos Error on {HOST.NAME}
+
+ 0
+ 4
+
+ 0
+
+
+
+
+
+ Mongos Network IO
+ 900
+ 300
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 2
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Mongos
+ mongos_netin
+
+
+
+ 1
+ 2
+ C80000
+ 0
+ 2
+ 0
+ -
+ Mongos
+ mongos_netout
+
+
+
+
+
+ Mongos Operations
+ 900
+ 300
+ 0.0000
+ 100.0000
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0.0000
+ 0.0000
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 2
+ 00C800
+ 0
+ 2
+ 0
+ -
+ Mongos
+ mongos_command
+
+
+
+ 1
+ 2
+ C80000
+ 0
+ 2
+ 0
+ -
+ Mongos
+ mongos_delete
+
+
+
+ 2
+ 2
+ 0000C8
+ 0
+ 2
+ 0
+ -
+ Mongos
+ mongos_getmore
+
+
+
+ 3
+ 2
+ C800C8
+ 0
+ 2
+ 0
+ -
+ Mongos
+ mongos_insert
+
+
+
+ 4
+ 2
+ 00C8C8
+ 0
+ 2
+ 0
+ -
+ Mongos
+ mongos_query
+
+
+
+ 5
+ 2
+ 000000
+ 0
+ 2
+ 0
+ -
+ Mongos
+ mongos_total_ops
+
+
+
+ 6
+ 2
+ EEEE00
+ 0
+ 2
+ 0
+ -
+ Mongos
+ mongos_update
+
+
+
+
+
+