Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Event Log Reports

Event Log Reports

Scheduled Pinned Locked Moved Support
2 Posts 1 Posters 36.9k Views
  • 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.
  • C
    C
    cmatthews
    wrote on last edited by
    #1

    For PCI and systems management I made a few jasperReports that people may find useful. The reports in our report runner wrapper are drillable web reports but I'm sure others can find ways to make the reports useful.

    I am attaching some samples of how the reports results look and the queries involved so people can either use it or improve upon it. I also have some other views of drill down data that summarizes events in different ways. The NetXMS tool is valuable in a variery of ways to my organization, so I wanted to share so of what I am doing with it.

    For the "Event Systems" report.

    SELECT
    	id,
    	primary_ip,
    	agent_version,
    	platform_name,
    	uname
    FROM
    	NETXMS.netxms.NODES WITH (NOLOCK)
    WHERE
    	platform_name like 'windows%'
    ORDER BY
    	uname
    

    For the "Event groups"

    DECLARE @startDate INT
    DECLARE @endDate INT
    
    SET @startDate = (SELECT dbo.F_DATETIME_TO_UNIX_TIME('2011/02/01'))
    SET @endDate = (SELECT dbo.F_DATETIME_TO_UNIX_TIME('2011/02/03'))
    
    SELECT TOP 1500
    	eventCfg.event_code,
    	eventCfg.event_name,
    	LEFT(event_message,20) as eventMessage,
    	COUNT(*) as eventCount,
    	COUNT(DISTINCT event_source) as nodeCount
    FROM (
    	SELECT
    		*
    	FROM
    		NETXMS.netxms.EVENT_LOG WITH (nolock)
    	WHERE
    		event_timestamp BETWEEN @startDate and @endDate
    	) eventDtl
    	JOIN NETXMS.netxms.event_cfg eventCfg
    		ON eventDtl.event_code = eventCfg.event_code
    GROUP BY
    	eventCfg.event_code,
    	eventCfg.event_name,
    	LEFT(event_message,20)
    ORDER BY
    	event_name
    

    For the Event Details by System (Drill down)

    SELECT
    	event_id,
    	eventCfg.event_code,
    	eventCfg.event_name,
    	dbo.F_UNIX_TIME_TO_DATETIME(event_timestamp) as event_datetime,
    	event_message
    FROM (
    	SELECT
    		*
    	FROM
    		NETXMS.netxms.EVENT_LOG WITH (nolock)
    	WHERE
    		event_source = $P!{eventSource}
    	) eventDtl
    	JOIN NETXMS.netxms.event_cfg eventCfg
    		ON eventDtl.event_code = eventCfg.event_code
    WHERE
    	dbo.F_UNIX_TIME_TO_DATE(event_timestamp) BETWEEN '2011/01/01' AND '2011/01/31'
    ORDER BY
    	event_timestamp
    

    Regards,

    Clark


    Event Systems.jpg

    Event Details by System.jpg

    1 Reply Last reply
    0
    • C
      C
      cmatthews
      wrote on last edited by
      #2

      Event Groups Sample -- Too big for original post.


      Event Groups.jpg

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      Powered by NodeBB Contributors
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups