示例#1
0
 def autoconf(self):
     """Implements Munin Plugin Auto-Configuration Option.
     
     @return: True if plugin can be  auto-configured, False otherwise.
              
     """
     ntpinfo = NTPinfo()
     ntpstats = ntpinfo.getHostOffsets(self._remoteHosts)
     return len(ntpstats) > 0
示例#2
0
 def autoconf(self):
     """Implements Munin Plugin Auto-Configuration Option.
     
     @return: True if plugin can be  auto-configured, False otherwise.
              
     """
     ntpinfo = NTPinfo()
     ntpstats = ntpinfo.getHostOffsets(self._remoteHosts)
     return len(ntpstats) > 0
示例#3
0
 def retrieveVals(self):
     """Retrieve values for graphs."""
     ntpinfo = NTPinfo()
     ntpstats = ntpinfo.getHostOffsets(self._remoteHosts)
     if ntpstats:
         for host in self._remoteHosts:
             hostkey = re.sub("\.", "_", host)
             hoststats = ntpstats.get(host)
             if hoststats:
                 if self.hasGraph("ntp_host_stratums"):
                     self.setGraphVal("ntp_host_stratums", hostkey, hoststats.get("stratum"))
                 if self.hasGraph("ntp_host_offsets"):
                     self.setGraphVal("ntp_host_offsets", hostkey, hoststats.get("offset"))
                 if self.hasGraph("ntp_host_delays"):
                     self.setGraphVal("ntp_host_delays", hostkey, hoststats.get("delay"))
示例#4
0
 def retrieveVals(self):
     """Retrive values for graphs."""
     ntpinfo = NTPinfo()
     ntpstats = ntpinfo.getHostOffsets(self._remoteHosts)
     if ntpstats:
         for host in self._remoteHosts:
             hostkey = re.sub('\.', '_', host)
             hoststats = ntpstats.get(host)
             if hoststats:
                 if self.hasGraph('ntp_host_stratums'):
                     self.setGraphVal('ntp_host_stratums', hostkey, 
                                      hoststats.get('stratum'))
                 if self.hasGraph('ntp_host_offsets'):
                     self.setGraphVal('ntp_host_offsets', hostkey, 
                                      hoststats.get('offset'))
                 if self.hasGraph('ntp_host_delays'):
                     self.setGraphVal('ntp_host_delays', hostkey, 
                                      hoststats.get('delay'))
示例#5
0
 def retrieveVals(self):
     """Retrieve values for graphs."""
     ntpinfo = NTPinfo()
     ntpstats = ntpinfo.getHostOffsets(self._remoteHosts)
     if ntpstats:
         for host in self._remoteHosts:
             hostkey = re.sub('\.', '_', host)
             hoststats = ntpstats.get(host)
             if hoststats:
                 if self.hasGraph('ntp_host_stratums'):
                     self.setGraphVal('ntp_host_stratums', hostkey,
                                      hoststats.get('stratum'))
                 if self.hasGraph('ntp_host_offsets'):
                     self.setGraphVal('ntp_host_offsets', hostkey,
                                      hoststats.get('offset'))
                 if self.hasGraph('ntp_host_delays'):
                     self.setGraphVal('ntp_host_delays', hostkey,
                                      hoststats.get('delay'))