Monitoring hosts with SNMP

SNMP Receiver in OpenTelemetry Contrib Collector supports monitoring metrics from SNMP-enabled hosts on Instana. Metrics from the SNMP-enabled host are collected based on the configurations set in the OpenTelemetry configuration file.

To set up OpenTelemetry SNMP Collector, complete the following steps:

  1. Download the latest binaries of OpenTelemetry Contrib Collector Release to a known location. The binaries must be compatible with the operating system and architecture.

  2. Extract the downloaded archived release to a folder. The folder typically contains the following files:

    • Executable "otelcol-contrib"
    • README.md
  3. Create a configuration file, for example: host-snmp.yaml, by using a sample configuration file. For configuration file samples, see Sample configuration files.

  4. In the configuration file, set the Instana agent host IP as shown in the following example:

      exporters:
        logging:
          verbosity: detailed
        otlphttp:
          endpoint: "http://9.112.252.66:4318" # Instana Agent details.
          tls:
            insecure: true
    
  5. Update the hostname in processor resource attributes of the configuration file as necessary. For example, on a Linux system, you can find the hostname by using the following command:

       hostname -f
    
  6. Update the host IP in processors resource attributes of the configuration file. For example, on a Linux system, you can find the host ID by using the following command:

       cat /etc/machine-d
    
  7. Start OpenTelemetry Collector, and run otel-contrib with the configuration files as shown in the following example:

       otel-contrib --config host-snmp.yaml 
    

Sample configuration files

You can reuse the examples that are listed to create configuration files.

Monitoring localhost

A sample configuration file to monitor localhost metrics on Instana in the following snippet:

receivers:
  snmp:
    collection_interval: 60s
    endpoint: udp://127.0.0.1:161
    version: v1 # Version of SNMP typically v1, v2c or v3
    security_level: no_auth_no_priv2
    user: # username
    auth_type: "MD5"
    auth_password: #password
    privacy_type: #"DES"
    privacy_password: # password
    attributes:
      cpustate:
        value: state
        enum:
          - user
          - system
          - idle
          - interrupt
          - nice
          - steal
          - softirq
          - wait
      cpu:
        value: cpu
        enum:
          - cpuall
      cpuloadstate:
        value: direction
        enum:
          - Load-1
          - Load-5
          - Load-15
      diskdevice:
        value: device
        oid: ".1.3.6.1.4.1.2021.13.15.1.1.2"
      diskdirection:
        value: direction
        enum:
          - read
          - write
      memstate:
        value: state
        enum:
          - used
          - free
          - buffered
          - cached
          - slab_reclaimable
          - slab_unreclaimable
      filesystemstate:
        value: state
        enum:
          - free
          - used
          - reserved
      filesystemdevice:
        value: device
        oid: ".1.3.6.1.2.1.25.2.3.1.3"
      filesystemmountpoint:
        value: mountpoint
        oid: ".1.3.6.1.2.1.25.2.3.1.3"
      networkdirection:
        value: direction
        enum:
          - transmit
          - receive
      networkdevice:
        value: device
        oid: ".1.3.6.1.2.1.2.2.1.2"

    metrics:
      #cpu
      system.cpu.time:
        description: "CPU Time"
        unit: "s"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: double
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.11.9.0"
            attributes:
              - name: cpustate
                value: user
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.10.0"
            attributes:
              - name: cpustate
                value: system
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.11.0"
            attributes:
              - name: cpustate
                value: idle
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.51.0"
            attributes:
              - name: cpustate
                value: nice
              - name: cpu
                value: cpuall
      #cpuload
      system.cpu.load_average.1m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.10.1.6.1"
            attributes:
              - name: cpuloadstate
                value: Load-1
      system.cpu.load_average.5m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.10.1.6.2"
            attributes:
              - name: cpuloadstate
                value: Load-5
      system.cpu.load_average.15m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.10.1.6.3"
            attributes:
              - name: cpuloadstate
                value: Load-15
      #disk
      system.disk.io:
        description: "disk io"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.4.1.2021.13.15.1.1.3"
            attributes:
              - name: diskdevice
              - name: diskdirection
                value: read
          - oid: ".1.3.6.1.4.1.2021.13.15.1.1.4"
            attributes:
              - name: diskdevice
              - name: diskdirection
                value: write
      #mem
      system.memory.usage:
        description: "Memory used"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.4.6.0"
            attributes:
              - name: memstate
                value: used
      #filesystem
      system.filesystem.usage:
        description: "usage"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.25.2.3.1.6"
            attributes:
              - name: filesystemdevice
              - name: filesystemmountpoint
              - name: filesystemstate
                value: used
      #network
      system.network.dropped:
        description: "dropped"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.13"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.19"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
      system.network.errors:
        description: "error"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.14"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.20"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
      system.network.io:
        description: "io"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.10"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.16"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
      system.network.packets:
        description: "packages"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.11"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.17"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
    otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:55677
      http:
        endpoint: 0.0.0.0:55678
        cors:
          allowed_origins:
            - "http://*"
            - "https://*"              
exporters:
  logging:
    verbosity: detailed
  otlphttp:
    endpoint: "http://9.112.252.66:4318" # Agent ip with 4318 port.
    tls:
      insecure: true

processors:
  batch:
  resourcedetection:
    detectors: [system]
    timeout: 2s
    override: true
    system:
      hostname_sources: ["dns", "os"]
  resource:
    attributes:
      - key: INSTANA_PLUGIN
        action: upsert
        value: "host"
      - key: host.name
        action: upsert
        value: "HostName" #Host Name
      - key: host.id
        action: upsert
        value: "HostId" #Host ID
      - key: snmp.endpoint
        action: upsert
        value: "127.0.0.1" # Host IP Address

service:
  pipelines:
    metrics:
      receivers: [snmp]
      processors: [batch,resource]
      exporters: [logging, otlphttp]
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, otlphttp]
  telemetry:
    metrics:
      address: localhost:18888
      level: basic

Monitoring remote host

A sample configuration file to monitor Remote Host metrics on Instana with a remote host, for example, IP 9.204.201.18, is shown in the following snippet:

receivers:
  snmp:
    collection_interval: 60s
    endpoint: udp://9.204.201.18:161 # Remote Host IP
    version: v1 # Version of SNMP typically v1, v2c or v3
    security_level: no_auth_no_priv2
    user: # username
    auth_type: "MD5"
    auth_password: #password
    privacy_type: #"DES"
    privacy_password: # password
    attributes:
      cpustate:
        value: state
        enum:
          - user
          - system
          - idle
          - interrupt
          - nice
          - steal
          - softirq
          - wait
      cpu:
        value: cpu
        enum:
          - cpuall
      cpuloadstate:
        value: direction
        enum:
          - Load-1
          - Load-5
          - Load-15
      diskdevice:
        value: device
        oid: ".1.3.6.1.4.1.2021.13.15.1.1.2"
      diskdirection:
        value: direction
        enum:
          - read
          - write
      memstate:
        value: state
        enum:
          - used
          - free
          - buffered
          - cached
          - slab_reclaimable
          - slab_unreclaimable
      filesystemstate:
        value: state
        enum:
          - free
          - used
          - reserved
      filesystemdevice:
        value: device
        oid: ".1.3.6.1.2.1.25.2.3.1.3"
      filesystemmountpoint:
        value: mountpoint
        oid: ".1.3.6.1.2.1.25.2.3.1.3"
      networkdirection:
        value: direction
        enum:
          - transmit
          - receive
      networkdevice:
        value: device
        oid: ".1.3.6.1.2.1.2.2.1.2"

    metrics:
      #cpu
       system.cpu.time:
        description: "CPU Time"
        unit: "s"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: double
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.11.9.0"
            attributes:
              - name: cpustate
                value: user
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.10.0"
            attributes:
              - name: cpustate
                value: system
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.11.0"
            attributes:
              - name: cpustate
                value: idle
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.51.0"
            attributes:
              - name: cpustate
                value: nice
              - name: cpu
                value: cpuall
       #cpuload
       system.cpu.load_average.1m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.10.1.6.1"
            attributes:
              - name: cpuloadstate
                value: Load-1
       system.cpu.load_average.5m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
         - oid: ".1.3.6.1.4.1.2021.10.1.6.2"
           attributes:
              - name: cpuloadstate
                value: Load-5
       system.cpu.load_average.15m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
         - oid: ".1.3.6.1.4.1.2021.10.1.6.3"
           attributes:
              - name: cpuloadstate
                value: Load-15
       #disk
       system.disk.io:
        description: "disk io"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.4.1.2021.13.15.1.1.3"
            attributes:
              - name: diskdevice
              - name: diskdirection
                value: read
          - oid: ".1.3.6.1.4.1.2021.13.15.1.1.4"
            attributes:
              - name: diskdevice
              - name: diskdirection
                value: write
       #mem
       system.memory.usage:
         description: "Memory used"
         unit: "by"
         sum:
           aggregation: cumulative
           monotonic: true
           value_type: int
         scalar_oids:
           - oid: ".1.3.6.1.4.1.2021.4.6.0"
             attributes:
               - name: memstate
                 value: used
       #filesystem
       system.filesystem.usage:
        description: "usage"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.25.2.3.1.6"
            attributes:
              - name: filesystemdevice
              - name: filesystemmountpoint
              - name: filesystemstate
                value: used
       #network
       system.network.dropped:
        description: "dropped"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.13"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.19"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
       system.network.errors:
        description: "error"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.14"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.20"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
       system.network.io:
        description: "io"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.10"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.16"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
       system.network.packets:
        description: "packages"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.11"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.17"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:55677
      http:
        endpoint: 0.0.0.0:55678
        cors:
          allowed_origins:
            - "http://*"
            - "https://*"
exporters:
  logging:
    verbosity: detailed
  otlphttp:
    endpoint: "http://9.112.252.66:4318" # Instana Agent Information
    tls:
      insecure: true

processors:
  batch:
  resourcedetection:
    detectors: [system]
    timeout: 2s
    override: true
    system:
      hostname_sources: ["dns", "os"]
  resource:
    attributes:
    - key: INSTANA_PLUGIN
      action: upsert
      value: "host"
    - key: host.name
      action: upsert
      value: "HostName" #Host Name
    - key: host.id
      action: upsert
      value: "HostId"  #Host ID
    - key: snmp.endpoint
      action: upsert
      value: "9.204.201.18" #Remote Host IP

service:
  pipelines:
    metrics:
      receivers: [snmp]
      processors: [batch,resource]
      exporters: [logging, otlphttp]
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, otlphttp]
  telemetry:
    metrics:
      address: localhost:18888
      level: basic

Monitoring multiple hosts:

A sample configuration file to monitor metrics from multiple hosts on Instana is shown in the following snippet. In the configuration file, sections are created for each host with separate pipelines.

receivers:
  snmp:
    collection_interval: 60s
    endpoint: udp://127.0.0.1:161 #Host1 - Localhost
    version: v1
    security_level: no_auth_no_priv2
    user: snmpuser
    auth_type: "MD5"
    auth_password: "passw0rd"
    privacy_type: "DES"
    privacy_password: "passw0rd"
    attributes:
      cpustate:
        value: state
        enum:
          - user
          - system
          - idle
          - interrupt
          - nice
          - steal
          - softirq
          - wait
      cpu:
        value: cpu
        enum:
          - cpuall
      cpuloadstate:
        value: direction
        enum:
          - Load-1
          - Load-5
          - Load-15
      diskdevice:
        value: device
        oid: ".1.3.6.1.4.1.2021.13.15.1.1.2"
      diskdirection:
        value: direction
        enum:
          - read
          - write
      memstate:
        value: state
        enum:
          - used
          - free
          - buffered
          - cached
          - slab_reclaimable
          - slab_unreclaimable
      filesystemstate:
        value: state
        enum:
          - free
          - used
          - reserved
      # filesystemdevice:
      #   oid: ".1.3.6.1.2.1.25.2.3.1.3"
      filesystemdevice:
        value: device
        oid: ".1.3.6.1.2.1.25.2.3.1.3"
      filesystemmountpoint:
        value: mountpoint
        oid: ".1.3.6.1.2.1.25.2.3.1.3"
      networkdirection:
        value: direction
        enum:
          - transmit
          - receive
      # networkdevice:
      #   oid: ".1.3.6.1.2.1.2.2.1.2"
      networkdevice:
        value: device
        oid: ".1.3.6.1.2.1.2.2.1.2"

    metrics:
      #cpu
       system.cpu.time:
        description: "CPU Time"
        unit: "s"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: double
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.11.9.0"
            attributes:
              - name: cpustate
                value: user
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.10.0"
            attributes:
              - name: cpustate
                value: system
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.11.0"
            attributes:
              - name: cpustate
                value: idle
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.51.0"
            attributes:
              - name: cpustate
                value: nice
              - name: cpu
                value: cpuall
       #cpuload
       system.cpu.load_average.1m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.10.1.6.1"
            attributes:
              - name: cpuloadstate
                value: Load-1
       system.cpu.load_average.5m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
         - oid: ".1.3.6.1.4.1.2021.10.1.6.2"
           attributes:
              - name: cpuloadstate
                value: Load-5
       system.cpu.load_average.15m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
         - oid: ".1.3.6.1.4.1.2021.10.1.6.3"
           attributes:
              - name: cpuloadstate
                value: Load-15
       #disk
       system.disk.io:
        description: "disk io"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.4.1.2021.13.15.1.1.3"
            attributes:
              - name: diskdevice
              - name: diskdirection
                value: read
          - oid: ".1.3.6.1.4.1.2021.13.15.1.1.4"
            attributes:
              - name: diskdevice
              - name: diskdirection
                value: write
       #mem
       system.memory.usage:
         description: "Memory used"
         unit: "by"
         sum:
           aggregation: cumulative
           monotonic: true
           value_type: int
         scalar_oids:
           - oid: ".1.3.6.1.4.1.2021.4.6.0"
             attributes:
               - name: memstate
                 value: used
       #filesystem
       system.filesystem.usage:
        description: "usage"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.25.2.3.1.6"
            attributes:
              - name: filesystemdevice
              - name: filesystemmountpoint
              # - name: storageType
              - name: filesystemstate
                value: used
       #network
       system.network.dropped:
        description: "dropped"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.13"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.19"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
       system.network.errors:
        description: "error"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.14"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.20"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
       system.network.io:
        description: "io"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.10"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.16"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
       system.network.packets:
        description: "packages"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.11"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.17"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
  snmp/2:
    collection_interval: 100s
    endpoint: udp://9.204.201.18:161 #Host 2: Remote Host 
    version: v1
    security_level: no_auth_no_priv2
    user: snmpuser
    auth_type: "MD5"
    auth_password: "passw0rd"
    privacy_type: "DES"
    privacy_password: "passw0rd"
    attributes:
      cpustate:
        value: state
        enum:
          - user
          - system
          - idle
          - interrupt
          - nice
          - steal
          - softirq
          - wait
      cpu:
        value: cpu
        enum:
          - cpuall
      cpuloadstate:
        value: direction
        enum:
          - Load-1
          - Load-5
          - Load-15
      diskdevice:
        value: device
        oid: ".1.3.6.1.4.1.2021.13.15.1.1.2"
      diskdirection:
        value: direction
        enum:
          - read
          - write
      memstate:
        value: state
        enum:
          - used
          - free
          - buffered
          - cached
          - slab_reclaimable
          - slab_unreclaimable
      filesystemstate:
        value: state
        enum:
          - free
          - used
          - reserved
      # filesystemdevice:
      #   oid: ".1.3.6.1.2.1.25.2.3.1.3"
      filesystemdevice:
        value: device
        oid: ".1.3.6.1.2.1.25.2.3.1.3"
      filesystemmountpoint:
        value: mountpoint
        oid: ".1.3.6.1.2.1.25.2.3.1.3"
      networkdirection:
        value: direction
        enum:
          - transmit
          - receive
      # networkdevice:
      #   oid: ".1.3.6.1.2.1.2.2.1.2"
      networkdevice:
        value: device
        oid: ".1.3.6.1.2.1.2.2.1.2"

    metrics:
      #cpu
       system.cpu.time:
        description: "CPU Time"
        unit: "s"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: double
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.11.9.0"
            attributes:
              - name: cpustate
                value: user
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.10.0"
            attributes:
              - name: cpustate
                value: system
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.11.0"
            attributes:
              - name: cpustate
                value: idle
              - name: cpu
                value: cpuall
          - oid: ".1.3.6.1.4.1.2021.11.51.0"
            attributes:
              - name: cpustate
                value: nice
              - name: cpu
                value: cpuall
       #cpuload
       system.cpu.load_average.1m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
          - oid: ".1.3.6.1.4.1.2021.10.1.6.1"
            attributes:
              - name: cpuloadstate
                value: Load-1
       system.cpu.load_average.5m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
         - oid: ".1.3.6.1.4.1.2021.10.1.6.2"
           attributes:
              - name: cpuloadstate
                value: Load-5
       system.cpu.load_average.15m:
        description: "CPU load"
        unit: "1"
        gauge:
          value_type: double
        scalar_oids:
         - oid: ".1.3.6.1.4.1.2021.10.1.6.3"
           attributes:
              - name: cpuloadstate
                value: Load-15
       #disk
       system.disk.io:
        description: "disk io"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.4.1.2021.13.15.1.1.3"
            attributes:
              - name: diskdevice
              - name: diskdirection
                value: read
          - oid: ".1.3.6.1.4.1.2021.13.15.1.1.4"
            attributes:
              - name: diskdevice
              - name: diskdirection
                value: write
       #mem
       system.memory.usage:
         description: "Memory used"
         unit: "by"
         sum:
           aggregation: cumulative
           monotonic: true
           value_type: int
         scalar_oids:
           - oid: ".1.3.6.1.4.1.2021.4.6.0"
             attributes:
               - name: memstate
                 value: used
       system.filesystem.usage:
        description: "usage"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.25.2.3.1.6"
            attributes:
              - name: filesystemdevice
              - name: filesystemmountpoint
              # - name: storageType
              - name: filesystemstate
                value: used
       #network
       system.network.dropped:
        description: "dropped"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.13"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.19"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
       system.network.errors:
        description: "error"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.14"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.20"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
       system.network.io:
        description: "io"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.10"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.16"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
       system.network.packets:
        description: "packages"
        unit: "by"
        sum:
          aggregation: cumulative
          monotonic: true
          value_type: int
        column_oids:
          - oid: ".1.3.6.1.2.1.2.2.1.11"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: receive
          - oid: ".1.3.6.1.2.1.2.2.1.17"
            attributes:
              - name: networkdevice
              - name: networkdirection
                value: transmit
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:55677
      http:
        endpoint: 0.0.0.0:55678
        cors:
          allowed_origins:
            - "http://*"
            - "https://*"
exporters:
  logging:
    verbosity: detailed
  otlphttp:
    endpoint: "http://9.112.252.66:4318"
    tls:
      insecure: true
  otlphttp/2:
    endpoint: "http://9.204.201.18:4318"
    tls:
      insecure: true

processors:
  batch:
  resourcedetection:
    detectors: [system]
    timeout: 2s
    override: true
    system:
      hostname_sources: ["dns", "os"]
  resource:
    attributes:
    - key: INSTANA_PLUGIN
      action: upsert
      value: "host"
    - key: host.name
      action: upsert
      value: "LocalHost" # Host Name
    - key: host.id
      action: upsert
      value: "LocalHost" # Host ID
    - key: snmp.endpoint
      action: upsert
      value: "127.0.0.1" # Host IP
  resource/2:
    attributes:
    - key: INSTANA_PLUGIN
      action: upsert
      value: "host"
    - key: host.name
      action: upsert
      value: "RemoteHost" #Host Name
    - key: host.id
      action: upsert
      value: "RemoteHost" # Host ID
    - key: snmp.endpoint
      action: upsert
      value: "9.204.201.18" # Host IP

service:
  pipelines:
    metrics:
      receivers: [snmp]
      processors: [batch,resource]
      exporters: [logging, otlphttp]
    metrics/2:
      receivers: [snmp/2]
      processors: [batch, resource/2]
      exporters: [logging, otlphttp]  
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, otlphttp]
  telemetry:
    metrics:
      address: localhost:18888
      level: basic

For more information about other alternatives to install and use OpenTelemetry executables, see Install the Collector.