• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    mysql query for user tracking

    Scheduled Pinned Locked Moved
    General Problems
    3
    4
    423
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Greg PlamondonG
      Greg Plamondon Testers
      last edited by

      Can anyone help me with a Mysql query to track users?
      I would like to search by username.

      The reason I am asking is the user tracking function is giving me fits, we have a very large database.

      Thanks.

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @Greg Plamondon
        last edited by

        @greg-plamondon Forgive my ignorance, track users against what? (this maybe an unused feature to me in FOG). To know what tables to hit, I need something fog knows about.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        Greg PlamondonG 1 Reply Last reply Reply Quote 0
        • Greg PlamondonG
          Greg Plamondon Testers @george1421
          last edited by

          @george1421
          I need to know what PC a user has logged into.
          you can find it in the GUI under Reports > User Tracking

          from there you can type a users login ID ito the field and search it will list what PC the user has logged into.

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            @Greg-Plamondon Try these queries:

            Get a list of (unique) host IDs where username logged in to:

            SELECT DISTINCT utHostID FROM userTracking WHERE utUserName LIKE '%username%';
            

            Now combine this query to get the list of hostnames as well:

            SELECT hostID,hostName FROM hosts WHERE hostID IN (SELECT DISTINCT utHostID FROM userTracking WHERE utUserName LIKE '%username%');
            

            Be aware that the first query might return more results than the later one because older user tracking entries will still exist even if you delete a host from your database. In that case the later query won’t return this host.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post

            150

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project