示例#1
0
 def autoconf(self):
     """Implements Munin Plugin Auto-Configuration Option.
     
     @return: True if plugin can be  auto-configured, False otherwise.
              
     """
     ntpinfo = NTPinfo()
     stats = ntpinfo.getPeerStats()
     return len(stats) > 0
示例#2
0
 def autoconf(self):
     """Implements Munin Plugin Auto-Configuration Option.
     
     @return: True if plugin can be  auto-configured, False otherwise.
              
     """
     ntpinfo = NTPinfo()
     stats = ntpinfo.getPeerStats()
     return len(stats) > 0
示例#3
0
 def retrieveVals(self):
     """Retrieve values for graphs."""
     ntpinfo = NTPinfo()
     stats = ntpinfo.getPeerStats()
     if stats:
         if self.hasGraph("ntp_peer_stratum"):
             self.setGraphVal("ntp_peer_stratum", "stratum", stats.get("stratum"))
         if self.hasGraph("ntp_peer_stats"):
             self.setGraphVal("ntp_peer_stats", "offset", stats.get("offset"))
             self.setGraphVal("ntp_peer_stats", "delay", stats.get("delay"))
             self.setGraphVal("ntp_peer_stats", "jitter", stats.get("jitter"))
示例#4
0
 def retrieveVals(self):
     """Retrieve values for graphs."""
     ntpinfo = NTPinfo()
     stats = ntpinfo.getPeerStats()
     if stats:
         if self.hasGraph('ntp_peer_stratum'):
             self.setGraphVal('ntp_peer_stratum', 'stratum',
                              stats.get('stratum'))
         if self.hasGraph('ntp_peer_stats'):
             self.setGraphVal('ntp_peer_stats', 'offset',
                              stats.get('offset'))
             self.setGraphVal('ntp_peer_stats', 'delay', stats.get('delay'))
             self.setGraphVal('ntp_peer_stats', 'jitter',
                              stats.get('jitter'))
示例#5
0
 def retrieveVals(self):
     """Retrieve values for graphs."""
     ntpinfo = NTPinfo()
     stats = ntpinfo.getPeerStats()
     if stats:
         if self.hasGraph('ntp_peer_stratum'):
             self.setGraphVal('ntp_peer_stratum', 'stratum', 
                              stats.get('stratum'))
         if self.hasGraph('ntp_peer_stats'):
             self.setGraphVal('ntp_peer_stats', 'offset', 
                              stats.get('offset'))
             self.setGraphVal('ntp_peer_stats', 'delay', 
                              stats.get('delay'))
             self.setGraphVal('ntp_peer_stats', 'jitter', 
                              stats.get('jitter'))