def add_network_datapoints(self, stats):
        transport = stats.get('transport', dict())
        self.add_derive_value('Network/Traffic/Received', 'bytes',
                              transport.get('rx_size_in_bytes', 0))
        self.add_derive_value('Network/Traffic/Sent', 'bytes',
                              transport.get('tx_size_in_bytes', 0))

        network = stats.get('network', dict())
        self.add_derive_value('Network/Connections/Active', 'conn',
                              network.get('active_opens', 0))
        self.add_derive_value('Network/Connections/Passive', 'conn',
                              network.get('passive_opens', 0))
        self.add_derive_value('Network/Connections/Reset', 'conn',
                              network.get('estab_resets', 0))
        self.add_derive_value('Network/Connections/Failures', 'conn',
                              network.get('attempt_fails', 0))

        self.add_derive_value('Network/HTTP Connections', 'conn',
                              stats.get('http', dict()).get('total_opened', 0))

        self.add_derive_value('Network/Segments/In', 'seg',
                              network.get('in_seg', 0))
        self.add_derive_value('Network/Segments/In', 'errors',
                              network.get('in_errs', 0))
        self.add_derive_value('Network/Segments/Out', 'seg',
                              network.get('out_seg', 0))
        self.add_derive_value('Network/Segments/Retransmitted', 'seg',
                              network.get('retrans_segs', 0))
Add the data points for Component/Network
dataset/ETHPy150Open MeetMe/newrelic-plugin-agent/newrelic_plugin_agent/plugins/elasticsearch.py/ElasticSearch.add_network_datapoints