Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-6377

Adding FreeBSD jail name/id for proc.num item

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 5.0.5, 5.2.1
    • Agent (G)
    • FreeBSD 8.0+, zabbix_agent 5.0+

      The proc.c patch adds FreeBSD 8.0+ jail [1] support for the proc.num[] item.

      The item takes a fifth parameter as a jail ID or name.

      • If the parameter is empty, information about all processes on the server is returned.
      • If the parameter contains the name or ID of an existing jail, information about processes inside the jail is returned.
      • If the parameter contains 0, information about processes on the host is returned only, processes inside jails are ignored.

      This behavior corresponds to the ps (-J option) [2] and sockstat (-j option) [3] utilities.

      This patch requires the libjail [4] library, which was introduced in FreeBSD 8.0, so I added a patch to configure.ac that checks for the libjail library. If the library is not found, the fifth parameter of the proc.num[] item is ignored.
       

      [1] https://www.freebsd.org/doc/handbook/jails.html

      [2] https://www.freebsd.org/cgi/man.cgi?ps(1)

      [3] https://www.freebsd.org/cgi/man.cgi?sockstat(1)

      [4] https://www.freebsd.org/cgi/man.cgi?jail_getid(3)

        1. proc.c.patch
          4 kB
          Vyacheslav Terekhov

            vso Vladislavs Sokurenko
            olorin Vyacheslav Terekhov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: