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

make system.users.num item return the number of distinct users

    Details

    • Type: Change Request
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.8
    • Fix Version/s: None
    • Component/s: Agent (G)
    • Labels:
      None

      Description

      Currently, the system.users.num item returns the number of sessions, counting the number of lines in the output of who:

      $ who
      asaveljevs pts/0        2018-03-29 16:26 (:0)
      asaveljevs pts/1        2018-03-29 16:26 (:0)
      asaveljevs pts/3        2018-03-29 16:44 (:0:S.0)
      asaveljevs pts/4        2018-03-29 16:44 (:0:S.1)
      asaveljevs pts/5        2018-04-03 12:57 (:0:S.2)
      asaveljevs pts/6        2018-04-04 12:07 (:0:S.3)
      asaveljevs pts/7        2018-04-04 12:08 (:0:S.4)
      asaveljevs pts/8        2018-04-05 11:59 (:0:S.5)
      asaveljevs pts/9        2018-04-20 13:13 (:0:S.6)
      asaveljevs pts/10       2018-04-20 14:00 (:0:S.7)
      asaveljevs pts/11       2018-04-27 14:26 (:0:S.8)
      
      $ who | wc -l
      11
      
      $ zabbix_agentd -t system.users.num
      system.users.num                              [u|11]
      

      This is nice, but in reality there is just one user logged in. Similarly, if a single user (Alice) establishes two SSH sessions to a server, system.users.num will return 2. Perhaps this can be solved by adding a parameter to system.users.num to choose between the current behavior and the number of distinct users.

      There may be a similar need to monitor whether a particular user is logged in. For instance, Alice may want to monitor if Bob is logged on to a server for a long time.

        Attachments

          Activity

            People

            • Assignee:
              vjaceslavs Vjaceslavs Bogdanovs
              Reporter:
              asaveljevs Aleksandrs Saveljevs
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: