Thermostat/Database

From IcedTea

Jump to: navigation, search

Thermostat Home

This page is out of date. The best source for current database details is the source code itself.


Database schema

database: thermostat

collections named as *-stats should contain data that often changes (or new data points are often added). Collections named as *-info should be fairly constant (and/or change only once in a long while).

collection: agent-config Keeps the current agent configuration

{
    agent-id: [uuid]
    start-time: [timestamp]
    backends: {
        backend-name1: {
            name: [human readable name]
            description: [description]
            version: [version]
            active: [
                new: [true|false]        # monitor new vms
                pids: [
                    [pid1]
                    [pid2]
                    ....
                ]
            ]
            key1: val1
        }
    }
}

collection: host-info Contains static machine information

{
    agent-id: [uuid]
    hostname: [human readable name]
    os_name: [distro]
    os_kernel: [linux with version]
    cpu_num: [number of cpus]
    memory_total: [total memory]
}

collection: network-info

{
    agent-id: [uuid]
    iface: [interface]
    ip4addr: [ip4addr]
    ip6addr: [ip6addr]
}

collection: cpu-stats

{
    agent-id: [uuid]
    timestamp: [timestamp]
    load: [15-load, 10-load, 5-load]
}

collection: memory-stats

{
    agent-id: [uuid]
    timestamp: [timestamp]
    total: [total memory; long]
    free: [long]
    buffers: [long]
    cached: [long]
    swap-total: [long]
    swap-free: [long]
    commit-limit: [long]
}


collection: vm-info Contains vm information

{
    agent-id: [uuid]
    vm-id: [uuid] # is this needed?
    pid: [vm pid aka lvmid]
    runtime-version: [jre version]
    java-home: [path to java home] 
    main-class: [main class]
    command-line: [command line]
    vm-name: [hotspot server/client vm]
    vm-arguments: [vm args]
    vm-info: [midex mode/interpreted... etc]
    vm-version: [a version]
    environment: {
        env-key1: env-val1
    }
    libraries: [
        [lib1.so],
        [lib2.so]
    ]
    start-time: [timestamp]
    stop-time: [timestamp]
}

Thoughts: 1. We need vm-id as separate from pid to keep things unique. We need to be careful with pids being reused. Perhaps it's not needed? If we do discard it, all references to vm-id mean the vm-pid (aka lvmid).

collection: vm-cpu-stats

{
    agent-id: [uuid]
    vm-id: [uuid]
    processor-usage: [percentage]
}

collection: vm-memory-stats

{
    agent-id: [uuid] 
    vm-id: [uuid]
    timestamp: [timestamp]
    allocated: [allocated]
    free: [free]
    eden: {
        gen: new
        collector: [collector]
        capacity: [bytes]
        max-capacity: [bytes]
        used: [bytes]
    }
    s0: {
        gen: new
        collector: [collector]
        capacity: [bytes]
        max-capacity: [bytes]
        used: [bytes]
    }
    s1: {
        gen: new
        collector: [collector]
        capacity: [bytes]
        max-capacity: [bytes]
        used: [bytes]
    }
    old: {
        gen: old
        collector: [collector]
        capacity: [bytes]
        max-capacity: [bytes]
        used: [bytes]
    }
    perm: {
        gen: perm
        collector: [None]
        capacity: [bytes]
        max-capacity: [bytes]
        used: [bytes]
    }
}

collection: vm-gc-stats

{
    agent-id: [uuid]
    vm-id: [uuid]
    collector: [collector name]
    run-count: [number of runs]
    wall-time: [time in millis]
}


collection: io-disk-stats

collection: io-network-stats

collection: vm-io-stats

collection: vm-sync-stats

collection: vm-class-stats

collection: vm-method-traces

collection: vm-thread-dumps

Personal tools