Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-3593

proxmox-qemu (agent) pvesh not showing guests

Details

    • Bug
    • Resolution: Not A Bug
    • Minor
    • None
    • Community Edition
    • Unix Agent
    • None
    • ubuntu 20.04 (virtualized, home setup)
      proxmox ve 6.3 (debian)

    Description

      greetings

      managed to get the unix-agent running on a proxmox box but the "proxmox-qemu" agent when called manually does show me details on the VMs, in observium it doesn't show any.

      can I help troubleshoot this?

      how do I debug/get verbose the agent?

       

       

      root@pve:/usr/lib/observium_agent/scripts-available# cat proxmox-qemu
      #!/bin/bash

      # Proxmox VE virtual machine listing
      # (c) 2015-2019, Tom Laermans for Observium

      PVESH=`which pvesh`
      if [ $? -eq 0 ]
      then
      {{ echo "<<<proxmox-qemu>>>"}}

      VERSION=$(pveversion | awk -F/ '{print $2}' | sed 's/\..*//')
      {{ if [[ ${VERSION} -ge 5 ]]}}
      {{ then}}
      {{ pvesh get /nodes/$(hostname)/qemu --output-format=json-pretty 2>/dev/null}}
      {{ else}}
      {{ pvesh get /nodes/$(hostname)/qemu 2>/dev/null}}
      {{ fi}}
      fi
      {{}}

      root@pve:/usr/lib/observium_agent/scripts-available# which pvesh
      /usr/bin/pvesh

      root@pve:/usr/lib/observium_agent/scripts-available# pvesh get /nodes/pve/qemu
      ┌─────────┬──────┬──────┬──────┬───────────┬──────────┬───────────┬───────┬───────────┬──────┬──────────────────┐
      │ status │ vmid │ cpus │ lock │ maxdisk │ maxmem │ name │ pid │ qmpstatus │ tags │ uptime │
      ╞═════════╪══════╪══════╪══════╪═══════════╪══════════╪═══════════╪═══════╪═══════════╪══════╪══════════════════╡
      │ running │ 103 │ 1 │ │ 32.00 GiB │ 2.00 GiB │ observium │ 29917 │ │ │ 6h 15m 19s │
      ├─────────┼──────┼──────┼──────┼───────────┼──────────┼───────────┼───────┼───────────┼──────┼──────────────────┤
      │ running │ 100 │ 2 │ │ 64.00 GiB │ 2.00 GiB │ plex │ 26149 │ │ │ 1w 1d 3h 22m 10s │
      ├─────────┼──────┼──────┼──────┼───────────┼──────────┼───────────┼───────┼───────────┼──────┼──────────────────┤
      │ running │ 102 │ 2 │ │ 5.00 GiB │ 2.00 GiB │ vyos │ 9263 │ │ │ 1w 1d 9h 24m 25s │
      ├─────────┼──────┼──────┼──────┼───────────┼──────────┼───────────┼───────┼───────────┼──────┼──────────────────┤
      │ running │ 101 │ 1 │ │ 15.00 GiB │ 2.00 GiB │ nextcloud │ 30959 │ │ │ 1w 1d 3h 20m 8s │
      └─────────┴──────┴──────┴──────┴───────────┴──────────┴───────────┴───────┴───────────┴──────┴──────────────────┘
      root@pve

       

       

      Attachments

        Activity

          [OBS-3593] proxmox-qemu (agent) pvesh not showing guests

          That is interesting, because you said running it manually showed VMs...

          sid3windr Tom Laermans added a comment - That is interesting, because you said running it manually showed VMs...

          I feel stupid now

          But with a filesize of 0 this can not work.

          copied again - made executable - see VMs - APOLOGIES!

           

          before:

          rw-r-r- 1 root root 5127 Dec 31 01:09 postgresql.pl
          rw-rr- 1 root root 115 Dec 31 01:09 powerdns
          rw-rr- 1 root root 120 Dec 31 01:09 powerdns-recursor
          rw-rr- 1 root root 0 Jan 1 13:20 proxmox-qemu <<<<<<<<<<<<<<<
          rw-rr- 1 root root 3632 Dec 31 01:09 raspberrypi
          rw-rr- 1 root root 228 Dec 31 01:09 README
          rw-rr- 1 root root 577 Dec 31 01:09 rpm

           

          after:

          rw-rr- 1 root root 80 Dec 31 01:09 postgresql.conf
          rw-rr- 1 root root 5127 Dec 31 01:09 postgresql.pl
          rw-rr- 1 root root 115 Dec 31 01:09 powerdns
          rw-rr- 1 root root 120 Dec 31 01:09 powerdns-recursor
          -rwxr-xr-x 1 root root 409 Jan 1 14:40 proxmox-qemu <<<<<<<<<<<<<<
          rw-rr- 1 root root 3632 Dec 31 01:09 raspberrypi
          rw-rr- 1 root root 228 Dec 31 01:09 README
          rw-rr- 1 root root 577 Dec 31 01:09 rpm

           

          AndreasR Andreas Rüdel added a comment - I feel stupid now But with a filesize of 0 this can not work. copied again - made executable - see VMs - APOLOGIES!   before: rw-r- r - 1 root root 5127 Dec 31 01:09 postgresql.pl rw-r r - 1 root root 115 Dec 31 01:09 powerdns rw-r r - 1 root root 120 Dec 31 01:09 powerdns-recursor rw-r r - 1 root root 0 Jan 1 13:20 proxmox-qemu <<<<<<<<<<<<<<< rw-r r - 1 root root 3632 Dec 31 01:09 raspberrypi rw-r r - 1 root root 228 Dec 31 01:09 README rw-r r - 1 root root 577 Dec 31 01:09 rpm   after: rw-r r - 1 root root 80 Dec 31 01:09 postgresql.conf rw-r r - 1 root root 5127 Dec 31 01:09 postgresql.pl rw-r r - 1 root root 115 Dec 31 01:09 powerdns rw-r r - 1 root root 120 Dec 31 01:09 powerdns-recursor -rwxr-xr-x 1 root root 409 Jan 1 14:40 proxmox-qemu <<<<<<<<<<<<<< rw-r r - 1 root root 3632 Dec 31 01:09 raspberrypi rw-r r - 1 root root 228 Dec 31 01:09 README rw-r r - 1 root root 577 Dec 31 01:09 rpm  

          I think so..  used ln -s as per

          https://docs.observium.org/unix_agent/#enabling-observiums-unix-agent-module

          root@pve:/usr/lib/observium_agent# ls scripts-enabled/ -lah
          total 12K
          drwxr-xr-x 2 root root 7 Dec 31 01:33 .
          drwxr-xr-x 4 root root 4 Dec 31 01:07 ..
          lrwxrwxrwx 1 root root 46 Dec 31 01:10 dmi -> /usr/lib/observium_agent/scripts-available/dmi
          lrwxrwxrwx 1 root root 50 Dec 31 01:15 hddtemp -> /usr/lib/observium_agent/scripts-available/hddtemp
          lrwxrwxrwx 1 root root 51 Dec 31 01:12 ipmitool -> /usr/lib/observium_agent/scripts-available/ipmitool
          lrwxrwxrwx 1 root root 45 Dec 31 01:14 nc -> /usr/lib/observium_agent/scripts-available/nc
          lrwxrwxrwx 1 root root 55 Dec 31 01:10 proxmox-qemu -> /usr/lib/observium_agent/scripts-available/proxmox-qemu
          root@pve:/usr/lib/observium_agent#

          AndreasR Andreas Rüdel added a comment - I think so..  used ln -s as per https://docs.observium.org/unix_agent/#enabling-observiums-unix-agent-module root@pve:/usr/lib/observium_agent# ls scripts-enabled/ -lah total 12K drwxr-xr-x 2 root root 7 Dec 31 01:33 . drwxr-xr-x 4 root root 4 Dec 31 01:07 .. lrwxrwxrwx 1 root root 46 Dec 31 01:10 dmi -> /usr/lib/observium_agent/scripts-available/dmi lrwxrwxrwx 1 root root 50 Dec 31 01:15 hddtemp -> /usr/lib/observium_agent/scripts-available/hddtemp lrwxrwxrwx 1 root root 51 Dec 31 01:12 ipmitool -> /usr/lib/observium_agent/scripts-available/ipmitool lrwxrwxrwx 1 root root 45 Dec 31 01:14 nc -> /usr/lib/observium_agent/scripts-available/nc lrwxrwxrwx 1 root root 55 Dec 31 01:10 proxmox-qemu -> /usr/lib/observium_agent/scripts-available/proxmox-qemu root@pve:/usr/lib/observium_agent#

          Did you also enable the script? Putting it in scripts-available is not enough - needs to be linked into scripts-enabled.

          sid3windr Tom Laermans added a comment - Did you also enable the script? Putting it in scripts-available is not enough - needs to be linked into scripts-enabled.

          Please make and attach additional information about the device:

          • full snmp dump from device:

            snmpwalk -v2c -c <community>  --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk
            snmpwalk -v2c -c <community>  --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk

            If device not support SNMP version 2c, replace -v2c with -v1.

          • If you have problems with discovery or poller processes, please do and attach these debugs:

            ./discovery.php -d -h <device>
            ./poller.php -d -h <device>

          • additionally attach device and/or vendor specific MIB files

          Note, this comment is added automatically.

          bot Observium Bot added a comment - Please make and attach additional information about the device: full snmp dump from device: snmpwalk -v2c -c <community> --hexOutputLength=0 -ObentxU <hostname> .1 > myagent.snmpwalk snmpwalk -v2c -c <community> --hexOutputLength=0 -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk If device not support SNMP version 2c, replace -v2c with -v1. If you have problems with discovery or poller processes, please do and attach these debugs: ./discovery.php -d -h <device> ./poller.php -d -h <device> additionally attach device and/or vendor specific MIB files Note, this comment is added automatically.

          People

            sid3windr Tom Laermans
            AndreasR Andreas Rüdel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: