Ad Widget

Collapse

How to see full test line in "latest data" search

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bogdar
    Member
    • Jan 2009
    • 33

    #1

    How to see full test line in "latest data" search

    Hello!
    There are "Host information" item which contain `uname -a` output.
    I search item like "Host information" in "Latest data" and got only few first chars - "Linux vim 2.6.26-2-a ...".
    How can I get full "Host information" lines for all my hosts?
  • MrKen
    Senior Member
    • Oct 2008
    • 652

    #2
    On the right-hand side, click on 'History'.
    Disclaimer: All of the above is pure speculation.

    Comment

    • bogdar
      Member
      • Jan 2009
      • 33

      #3
      Thanx, but I need lines for all hosts on same screen for review.

      Comment

      • MrKen
        Senior Member
        • Oct 2008
        • 652

        #4
        All hosts information on one screen. Can do!

        1. Create a screen with 1 column and X rows.

        2. Add items to screen as Plain text, Parameter = Server:Host information, show lines = 1.

        Repeat #2 for all your servers/hosts.

        MrKen
        Disclaimer: All of the above is pure speculation.

        Comment

        • bogdar
          Member
          • Jan 2009
          • 33

          #5
          How can I get such information using select on database?

          Make screen with custom items is very painfull and unreliable solution for our amount of boxes - one time somebody will forget to add item to screen and this sistem will be out of my review.
          Last edited by bogdar; 22-09-2009, 08:57.

          Comment

          • Calimero
            Senior Member
            • Nov 2006
            • 481

            #6
            If you only need the first 255 chars that are stored in items.lastvalue (probably sufficient for 'uname') you could use:

            Code:
            SELECT h.host, i.lastvalue
            FROM items AS i
            JOIN hosts AS h ON h.hostid = i.hostid
            WHERE i.key_ = 'system.uname'
            AND h.status = 0
            ORDER BY h.host ASC
            If you needed the full value (value >255 chars) the query would be a bit more complicated as you would have to fetch the latest value in history_str.

            Comment

            Working...