Am 11/16/2016 um 7:24 PM schrieb Gordon Messmer:
On 11/16/2016 09:21 AM, Rich Megginson wrote:I suggest you file a ticket at https://fedorahosted.org/389/newticket and attach this and the other information for tracking. This doesn't seem like an issue that will be easily resolved . . .OK. Is there any other data I can gather right now? The problem takes a few months to manifest, but once it does it gets pretty bad. That gives us narrow, rare windows to get useful data.
I would monitor the system(s) OS behavior with (example) collectd at least cpu, memory, load, iowait. Additional any either query/behavior specific monitoring can be implemented using collectd plugins like perl/python and additional the generic available stats like provided through cn=snmp,cn=monitor
regards mIkeexample collectd plugin /usr/share/collectd/python-plugins/389_monitorstats.py
import collectd import ldap instances = {} config = None monitorattrs = ['anonymousbinds', 'unauthbinds', 'simpleauthbinds','strongauthbinds', 'bindsecurityerrors', 'inops', 'readops', 'compareops', 'addentryops', 'removeentryops', 'modifyentryops', 'modifyrdnops', 'listops', 'searchops', 'onelevelsearchops', 'wholesubtreesearchops', 'referrals', 'chainings', 'securityerrors',
'errors', 'connections', 'connectionseq', 'bytesrecv','bytessent', 'entriesreturned', 'referralsreturned', 'masterentries',
'copyentries', 'cacheentries', 'cachehits', 'slavehits'] class LDAPStats(object): def __init__(self, hostname=None, port=389, binddn=None, bindpw=None): self.hostname = hostname self.binddn = binddn self.bindpw = bindpw self.port = int(port) if self.hostname != None: self.__get_stats__() def __get_stats__(self): self.srv = ldap.open(self.hostname, self.port) if self.binddn != None: self.srv.simple_bind_s(self.binddn, self.bindpw)dn, attrs = self.srv.search_s('cn=snmp,cn=monitor', ldap.SCOPE_BASE, attrlist=monitorattrs)[0]
for a in monitorattrs: if int(attrs[a][0]) < 0: attrs[a][0] = int(attrs[a][0]) * -1 setattr(self, a, int(attrs[a][0])) del self.srv def get_stats(self, hr=False): stats = [] for a in monitorattrs: stats.append(int(getattr(self, a))) if hr == False: return stats else: return zip(monitorattrs, stats) def configer(config): global instances collectd.debug('Configuring Stuff') # children', 'key', 'parent', 'values' for c in config.children: if c.key == 'server': for srv in c.children: if srv.key == 'hostname': hostname = '.'.join(srv.values) elif srv.key == 'port': port = int(srv.values[0]) instances[hostname] = port def initer(): collectd.debug('initing stuff') def reader(input_data=None): global instances for h in instances: srv = LDAPStats(hostname=h, port=instances[h])metric = collectd.Values(host=h, type='389monitorstats', plugin='389monitorstats', type_instance=h)
metric.values = srv.get_stats() metric.dispatch() collectd.register_config(configer) collectd.register_init(initer) collectd.register_read(reader) the corresponding /usr/share/collectd/types.db entry looks as follows389monitorstats anonymousbinds:COUNTER:0:U, unauthbinds:COUNTER:0:U, simpleauthbinds:COUNTER:0:U, strongauthbinds:COUNTER:0:U, bindsecurityerrors:COUNTER:0:U, inops:COUNTER:0:U, readops:COUNTER:0:U, compareops:COUNTER:0:U, addentryops:COUNTER:0:U, removeentryops:COUNTER:0:U, modifyentryops:COUNTER:0:U, modifyrdnops:COUNTER:0:U, listops:COUNTER:0:U, searchops:COUNTER:0:U, onelevelsearchops:COUNTER:0:U, wholesubtrsearchops:COUNTER:0:U, referrals:COUNTER:0:U, chainings:COUNTER:0:U, securityerrors:COUNTER:0:U, errors:COUNTER:0:U, connections:DERIVE:U:U, connectionseq:COUNTER:0:U, bytesrecv:COUNTER:0:U, bytessent:COUNTER:0:U, entriesreturned:COUNTER:0:U, referralsreturned:COUNTER:0:U, masterentries:COUNTER:0:U, copyentries:COUNTER:0:U, cacheentries:COUNTER:0:U, cachehits:COUNTER:0:U, slavehits:COUNTER:0:U
and collectd configuration /etc/collectd.d/python.conf LoadPlugin python <Plugin python> ModulePath "/usr/share/collectd/python-plugins" LogTraces true Interactive false Import "389_monitorstats" <Module 389_monitorstats> <server> hostname localhost port 389 </server> </Module> </Plugin>
_______________________________________________ 389-users mailing list -- 389-users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to 389-users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Attachment:
ldap_monitor.png
Description: PNG image
_______________________________________________ 389-users mailing list -- 389-users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to 389-users-leave@xxxxxxxxxxxxxxxxxxxxxxx