Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rest:
- - resource: http://192.168.1.2:61208/api/3/all
- sensor:
- - name: "Titan TCPIP Listen"
- value_template: '{{ value_json.connections.LISTEN }}'
- - name: "Titan TCPIP Established"
- value_template: '{{ value_json.connections.ESTABLISHED }}'
- - name: "Titan CPU"
- value_template: '{{ value_json.cpu.total | round (1) }}'
- unit_of_measurement: "%"
- - name: "Titan CPU User"
- value_template: '{{ value_json.cpu.user | round (1) }}'
- unit_of_measurement: "%"
- - name: "Titan CPU System"
- value_template: '{{ value_json.cpu.system | round (1) }}'
- unit_of_measurement: "%"
- - name: "Titan C Drive Read Bytes"
- value_template: >-
- {% set read_byte = value_json.diskio[0].read_bytes if value_json.diskio|length else none %}
- {% set time_since = value_json.diskio[0].time_since_update if value_json.diskio|length else none %}
- {% if (read_byte != None ) and (time_since != None ) %}
- {{ ((read_byte | int) / (time_since | int) / 1000000) | round (2) }}
- {% endif %}
- unit_of_measurement: 'MB/s'
- - name: "Titan C Drive Write Bytes"
- value_template: >-
- {% set write_byte = value_json.diskio[0].write_bytes if value_json.diskio|length else none %}
- {% set time_since = value_json.diskio[0].time_since_update if value_json.diskio|length else none %}
- {% if (write_byte != None ) and (time_since != None ) %}
- {{ ((write_byte | int) / (time_since | int) / 1000000) | round (2) }}
- {% endif %}
- unit_of_measurement: 'MB/s'
- - name: "Titan D Drive Read Bytes"
- value_template: >-
- {% set read_byte = value_json.diskio[1].read_bytes if value_json.diskio|length else none %}
- {% set time_since = value_json.diskio[1].time_since_update if value_json.diskio|length else none %}
- {% if (read_byte != None ) and (time_since != None ) %}
- {{ ((read_byte | int) / (time_since | int) / 1000000) | round (2) }}
- {% endif %}
- unit_of_measurement: 'MB/s'
- - name: "Titan D Drive Write Bytes"
- value_template: >-
- {% set write_byte = value_json.diskio[1].write_bytes if value_json.diskio|length else none %}
- {% set time_since = value_json.diskio[1].time_since_update if value_json.diskio|length else none %}
- {% if (write_byte != None ) and (time_since != None ) %}
- {{ ((write_byte | int) / (time_since | int) / 1000000) | round (2) }}
- {% endif %}
- unit_of_measurement: 'MB/s'
- - name: "Titan E Drive Read Bytes"
- value_template: >-
- {% set read_byte = value_json.diskio[2].read_bytes if value_json.diskio|length else none %}
- {% set time_since = value_json.diskio[2].time_since_update if value_json.diskio|length else none %}
- {% if (read_byte != None ) and (time_since != None ) %}
- {{ ((read_byte | int) / (time_since | int) / 1000000) | round (2) }}
- {% endif %}
- unit_of_measurement: 'MB/s'
- - name: "Titan E Drive Write Bytes"
- value_template: >-
- {% set write_byte = value_json.diskio[2].write_bytes if value_json.diskio|length else none %}
- {% set time_since = value_json.diskio[2].time_since_update if value_json.diskio|length else none %}
- {% if (write_byte != None ) and (time_since != None ) %}
- {{ ((write_byte | int) / (time_since | int) / 1000000) | round (2) }}
- {% endif %}
- unit_of_measurement: 'MB/s'
- - name: "Titan C Drive Used"
- value_template: '{{ value_json.fs.0.percent }}'
- unit_of_measurement: "%"
- - name: "Titan D Drive Used"
- value_template: '{{ value_json.fs.1.percent }}'
- unit_of_measurement: "%"
- - name: "Titan E Drive Used"
- value_template: '{{ value_json.fs.2.percent }}'
- unit_of_measurement: "%"
- - name: "Titan RAM"
- value_template: '{{ value_json.mem.percent | round }}'
- unit_of_measurement: "%"
- - name: "Titan RAM Used"
- value_template: '{{ (((value_json.mem.used / 1024) / 1024) / 1024) | round (1) }}'
- unit_of_measurement: "GB"
- - name: "Titan RAM Free"
- value_template: '{{ (((value_json.mem.free / 1024) / 1024) / 1024) | round (1) }}'
- unit_of_measurement: "GB"
- - name: "Titan Pagefile"
- value_template: '{{ value_json.memswap.percent | round }}'
- unit_of_measurement: "%"
- - name: "Titan Download Speed"
- value_template: >-
- {% set receive = value_json.network[0].rx if value_json.network|length else none %}
- {% set time_since = value_json.network[0].time_since_update if value_json.network|length else none %}
- {% if (receive != None ) and (time_since != None ) %}
- {{ ((receive | int) / (time_since | int) / 1000000) | round (2) }}
- {% endif %}
- unit_of_measurement: 'MB/s'
- - name: "Titan Upload Speed"
- value_template: >-
- {% set transmit = value_json.network[0].tx if value_json.network|length else none %}
- {% set time_since = value_json.network[0].time_since_update if value_json.network|length else none %}
- {% if (transmit != None ) and (time_since != None ) %}
- {{ ((transmit | int) / (time_since | int) / 1000000) | round (2) }}
- {% endif %}
- unit_of_measurement: 'MB/s'
- - name: "Titan Total Speed"
- value_template: >-
- {% set total = value_json.network[0].cx if value_json.network|length else none %}
- {% set time_since = value_json.network[0].time_since_update if value_json.network|length else none %}
- {% if (total != None ) and (time_since != None ) %}
- {{ ((total | int) / (time_since | int) / 1000000) | round (2) }}
- {% endif %}
- unit_of_measurement: 'MB/s'
- - name: "Titan Process Total"
- value_template: '{{ value_json.processcount.total }}'
- - name: "Titan Process Running"
- value_template: '{{ value_json.processcount.running }}'
- - name: "Titan Process Sleeping"
- value_template: '{{ value_json.processcount.sleeping }}'
- - name: "Titan Process Threads"
- value_template: '{{ value_json.processcount.thread }}'
- - name: "Process 0 CPU Percent"
- value_template: "{{ value_json.processlist.0.cpu_percent | round(1) }}"
- unit_of_measurement: "%"
- - name: "Process 0 VIRT"
- value_template: "{{ ((value_json.processlist.0.memory_info[0] / 1024) / 1024) | round(1) }}"
- unit_of_measurement: "MB"
- - name: "Process 0 RES"
- value_template: "{{ ((value_json.processlist.0.memory_info[1] / 1024) / 1024) | round(1) }}"
- unit_of_measurement: "MB"
- - name: "Process 0 EXE"
- value_template: >-
- {% set EXE = value_json.processlist[0].cmdline | regex_findall('([^\\\\]+\\.exe|[\w\.]+\.py|[\w\.]+\.cmd|[\w\.]+\.bat)', False) | join(', ') %}
- {% if not EXE == "" %}
- {{ EXE }}
- {% else %}
- {{ value_json.processlist[0].name }}
- {% endif %}
- - name: "Process 1 CPU Percent"
- value_template: "{{ value_json.processlist.1.cpu_percent | round(1) }}"
- unit_of_measurement: "%"
- - name: "Process 1 VIRT"
- value_template: "{{ ((value_json.processlist.1.memory_info[0] / 1024) / 1024) | round(1) }}"
- unit_of_measurement: "MB"
- - name: "Process 1 RES"
- value_template: "{{ ((value_json.processlist.1.memory_info[1] / 1024) / 1024) | round(1) }}"
- unit_of_measurement: "MB"
- - name: "Process 1 EXE"
- value_template: >-
- {% set EXE = value_json.processlist[1].cmdline | regex_findall('([^\\\\]+\\.exe|[\w\.]+\.py|[\w\.]+\.cmd|[\w\.]+\.bat)', False) | join(', ') %}
- {% if not EXE == "" %}
- {{ EXE }}
- {% else %}
- {{ value_json.processlist[1].name }}
- {% endif %}
- - name: "Process 2 CPU Percent"
- value_template: "{{ value_json.processlist.2.cpu_percent | round(1) }}"
- unit_of_measurement: "%"
- - name: "Process 2 VIRT"
- value_template: "{{ ((value_json.processlist.2.memory_info[0] / 1024) / 1024) | round(1) }}"
- unit_of_measurement: "MB"
- - name: "Process 2 RES"
- value_template: "{{ ((value_json.processlist.2.memory_info[1] / 1024) / 1024) | round(1) }}"
- unit_of_measurement: "MB"
- - name: "Process 2 EXE"
- value_template: >-
- {% set EXE = value_json.processlist[2].cmdline | regex_findall('([^\\\\]+\\.exe|[\w\.]+\.py|[\w\.]+\.cmd|[\w\.]+\.bat)', False) | join(', ') %}
- {% if not EXE == "" %}
- {{ EXE }}
- {% else %}
- {{ value_json.processlist[2].name }}
- {% endif %}
- - name: "Process 3 CPU Percent"
- value_template: "{{ value_json.processlist.3.cpu_percent | round(1) }}"
- unit_of_measurement: "%"
- - name: "Process 3 VIRT"
- value_template: "{{ ((value_json.processlist.3.memory_info[0] / 1024) / 1024) | round(1) }}"
- unit_of_measurement: "MB"
- - name: "Process 3 RES"
- value_template: "{{ ((value_json.processlist.3.memory_info[1] / 1024) / 1024) | round(1) }}"
- unit_of_measurement: "MB"
- - name: "Process 3 EXE"
- value_template: >-
- {% set EXE = value_json.processlist[3].cmdline | regex_findall('([^\\\\]+\\.exe|[\w\.]+\.py|[\w\.]+\.cmd|[\w\.]+\.bat)', False) | join(', ') %}
- {% if not EXE == "" %}
- {{ EXE }}
- {% else %}
- {{ value_json.processlist[3].name }}
- {% endif %}
- - name: "Process 4 CPU Percent"
- value_template: "{{ value_json.processlist.4.cpu_percent | round(1) }}"
- unit_of_measurement: "%"
- - name: "Process 4 VIRT"
- value_template: "{{ ((value_json.processlist.4.memory_info[0] / 1024) / 1024) | round(1) }}"
- unit_of_measurement: "MB"
- - name: "Process 4 RES"
- value_template: "{{ ((value_json.processlist.4.memory_info[1] / 1024) / 1024) | round(1) }}"
- unit_of_measurement: "MB"
- - name: "Process 4 EXE"
- value_template: >-
- {% set EXE = value_json.processlist[4].cmdline | regex_findall('([^\\\\]+\\.exe|[\w\.]+\.py|[\w\.]+\.cmd|[\w\.]+\.bat)', False) | join(', ') %}
- {% if not EXE == "" %}
- {{ EXE }}
- {% else %}
- {{ value_json.processlist[4].name }}
- {% endif %}
- - name: "Titan Uptime"
- value_template: '{{ value_json.uptime | regex_replace(find="[\"]", replace="") | regex_replace(find="(?<=( (\d{1})|(\d{2})):\d{2}):\d{2}", replace=" hours") }}'
- verify_ssl: false
- timeout: 30
- scan_interval: 6
Advertisement
Add Comment
Please, Sign In to add comment