Did I find the right examples for you? yes no

All Samples(23)  |  Call(15)  |  Derive(2)  |  Import(6)

src/d/d/dd-agent-HEAD/checks/nagios.py   dd-agent(Download)
import time
import re
from util import namedtuple, get_hostname
from utils import TailFile
 
# fields order for each event type, as named tuples
EVENT_FIELDS = {
    'CURRENT HOST STATE':       namedtuple('E_CurrentHostState', 'host, event_state, event_soft_hard, return_code, payload'),
    'CURRENT SERVICE STATE':    namedtuple('E_CurrentServiceState', 'host, check_name, event_state, event_soft_hard, return_code, payload'),
    'SERVICE ALERT':            namedtuple('E_ServiceAlert', 'host, check_name, event_state, event_soft_hard, return_code, payload'),
    'PASSIVE SERVICE CHECK':    namedtuple('E_PassiveServiceCheck', 'host, check_name, return_code, payload'),

src/d/d/dd-agent-HEAD/resources/__init__.py   dd-agent(Download)
 
from datetime import datetime, timedelta
import time
 
from util import namedtuple
 
 
MetricDescriptor = namedtuple('MetricDescriptor',['version','name','type','aggregator',
        'temporal_aggregator','server_aggregator','server_temporal_aggregator',
        'group_on','temporal_group_on'])
SnapshotDesc = namedtuple('SnapshotDesc',['version','fields'])

src/d/d/dd-agent-HEAD/resources/processes.py   dd-agent(Download)
 
from resources import ResourcePlugin, SnapshotDescriptor, SnapshotField, agg
from util import namedtuple
 
class Processes(ResourcePlugin):
                return (command.split()[0]).split('/')[-1]
 
        PSLine = namedtuple("PSLine","user,pid,pct_cpu,pct_mem,vsz,rss,tty,stat,started,time,command")
 
        self.start_snapshot()

src/d/d/dd-agent-HEAD/checks.d/cacti.py   dd-agent(Download)
import os
import time
from util import namedtuple
 
CFUNC_TO_AGGR = {
        field_names = instance.get('field_names', ['ifName', 'dskDevice'])
 
        Config = namedtuple('Config', [
            'host',
            'user',