Ad Widget

Collapse

Monitoring Users' Login to Windows Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kristijanultra
    Junior Member
    • Aug 2017
    • 3

    #1

    Monitoring Users' Login to Windows Server

    Since the Windows Template does not show any data about current users who are logged onto a Windows Server, is there any way to enable this?

    I need to view the currently logged on users, as well as the history of previous user logons.

    I mean, should I find any way using scripts or anything?
  • allexpetrov
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2017
    • 361

    #2
    Originally posted by kristijanultra
    Since the Windows Template does not show any data about current users who are logged onto a Windows Server, is there any way to enable this?

    I need to view the currently logged on users, as well as the history of previous user logons.

    I mean, should I find any way using scripts or anything?
    Hi there,
    you can try system.run[query user] to see the Logged In users. You can add something like system.run[query user |findstr /R "Active"] to see only Active user.

    But you need to enable remote commands in zabbix agent conf file.

    Regards,
    Alex!
    Last edited by allexpetrov; 22-08-2017, 17:04.

    Comment

    • kristijanultra
      Junior Member
      • Aug 2017
      • 3

      #3
      Originally posted by allexpetrov
      Hi there,
      you can try system.run[query user] to see the Logged In users. You can add something like system.run[query user |findstr /R "Active"] to see only Active user.

      But you need to enable remote commands in zabbix agent conf file.

      Regards,
      Alex!
      Hi, thanks for your reply. I am new into Zabbix. I would very much appreciate if you could be more specific. Does it have to do something with user parameters? Afterwards should I create an item?

      Thank you very much,
      Kristijan

      Comment

      • allexpetrov
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2017
        • 361

        #4
        Hi,
        so then you should do something like this:

        1. you need to open you agent config file and add :

        Code:
        EnableRemoteCommands=1
        This will enable Remote Commands from Zabbix Server to the Host.

        2. you need to add new item, better to add it to the Custom Template, but you can create it on host as well.

        item type - Zabbix Agent
        item key - system.run[query user]
        item type - Text

        Save it and then check if you have received an update in Latest data, if no - allow few minutes before it will be updated.

        Regards,
        Alex!

        Comment


        • Mighty33
          Mighty33 commented
          Editing a comment
          Thank you!!
          Last edited by Mighty33; 19-06-2022, 03:37. Reason: Just saw where to add... TY!
      • kristijanultra
        Junior Member
        • Aug 2017
        • 3

        #5
        That did the job as I needed. Even more, your example helped me better understand the basic customization steps.

        Best regards,
        Kristijan

        Comment

        • cedric.marcoux
          Junior Member
          • May 2018
          • 10

          #6
          A simple system run with this powershell, caracter type:
          Code:
          system.run[%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy ByPass -nologo -Command "(Get-WMIObject -class Win32_ComputerSystem | select username).username"]

          Comment

          • Mighty33
            Junior Member
            • Jun 2022
            • 4

            #7
            allexpetrov or anyone
            Sorry for the question/help...I am just starting out as well.
            I am on ver. 6 for Zabbix Ubuntu server.

            For the #2:
            When creating the new item, does this get added in the "Templates -> Value Mappings" ? I didn't see anywhere for items as type/key to setup.

            item type - Zabbix Agent
            item key - system.run[query user]
            item type - Text

            Comment

            Working...