def send_stats(when, stats, sender, to):
    for (plugin_type, plugin_inst), values in stats.items():
        if not values:
            continue
        collectd.PLUGIN_TYPE = plugin_type
        for message in collectd.messages(values, when, sender, plugin_inst):
            collectd.sock.sendto(message, to)
def send_stats(when, stats, sender, to):
    for (plugin_type, plugin_inst), values in stats.items():
        if not values:
            continue
        collectd.PLUGIN_TYPE = plugin_type
        for message in collectd.messages(values, when, sender, plugin_inst):
            collectd.sock.sendto(message, to)
 def assertValidMessages(self, expected_message_count, stats):
     packets = collectd.messages(stats)
     self.assertEqual(expected_message_count, len(packets))
     for packet in packets:
         self.assertValidPacket(7, packet)
Esempio n. 4
0
 def assertValidMessages(self, expected_message_count, stats):
     packets = collectd.messages(stats)
     self.assertEqual(expected_message_count, len(packets))
     for packet in packets:
         self.assertValidPacket(8, packet)