Adding FreeBSD jail name/id for proc.num item

XMLWordPrintable

    • Type: Change Request
    • Resolution: Unresolved
    • Priority: Medium
    • None
    • Affects Version/s: 5.0.5, 5.2.1
    • Component/s: Agent (G)
    • Environment:
      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)

            Assignee:
            Juris Lambda (Inactive)
            Reporter:
            Vyacheslav Terekhov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: