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. Scan for a certain service across all servers

Scan for a certain service across all servers

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 7.1k 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.
  • S
    S
    sharpspro
    wrote on last edited by
    #1

    GOAL: My goal is to be able to scan for a service like MSSQLServer and get a report back on all servers running that service.

    I created a DCI table (Services) and applied it to all server nodes. I would like to run a DCI summary table or a Dashboard to scan for a certain service running across all servers in my environment.

    I thought a DCI Table for services would collect all services running. Next would be a DCI Summary Table or Dashboard to run across the whole Infrastructure Services. Then I can take that info and make sure the proper templates are being applied.

    What would be the best way to accomplish this? Any ideas would be awesome.

    Thanks Guys!

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi,

      so ultimately you only need some mark that MS SQL is running on node to be able to apply templates? Then it could be accomplished much easier using configuration poll hook:

      1. Create script in script library named Hook::ConfigurationPoll like this:
      if ($node->isAgent)
      {
         state = AgentReadParameter($node, "System.ServiceState(mssqlserver)");
         if (state == 0)
         {
            SetCustomAttribute($node, "sqlServer", "true");
         }
      }
      

      it will set custom attribute sqlServer to true if service is running. Please note that service name might be different, I cannot remember correct name for SQL Server service.

      1. To auto apply templates, use the following auto-apply filter script:
      return GetCustomAttribute($node, "sqlServer") == "true";
      

      Best regards,
      Victor

      1 Reply Last reply
      0
      • S
        S
        sharpspro
        wrote on last edited by
        #3

        This worked great thanks Victor.  🙂

        Cheers!

        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