Ad Widget

Collapse

Template item for different counter instance

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kovas
    Member
    • Dec 2012
    • 39

    #1

    Template item for different counter instance

    Hi,

    We need to use template item but on each server’s counter have different instance, for example:

    Server1
    \SQL Server Replication Merge (publication1_server1)Conflicts\Sec
    \SQL Server Replication Merge (publication2_server1)Conflicts\Sec

    Server2
    \SQL Server Replication Merge (publication1_server2)Conflicts\Sec
    \SQL Server Replication Merge (publication2_server2)Conflicts\Sec

    Server3
    \SQL Server Replication Merge (publication1_server3)Conflicts\Sec
    \SQL Server Replication Merge (publication2_server3)Conflicts\Sec

    How can I configure template Item for all servers? I read documentation for Windows Performance counters but not sure how it should be configured

    Thanks
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    Yeah, this one isn't much fun. I have the same situation with several of my Sql Servers where they have changed the name of the Sql instance from the standard "sqlserver" name to some oddball name.

    The best way I have found to do it with perfcounters such as you show are to export my existing template which saves it on your local workstation as an XML file. Then I use Notepad++ to do a "find and replace all" of Server1 perfcounters with Server2 perfcounters.

    If you have templated triggers based on these items, you will have to do the same for the triggers.

    Also change the name of the template while you have it in your text editor.

    Save the XML and import it. Unlink your existing template (which you won't lose any history. If you use Unlink and clear, you lose history) and attach the new template to the appropriate server.

    If you are using an older 2.0 or earlier version of Zabbix, you will also have to create a new Application name for it, which would also require a find and replace all function. I think either 2.2 or 2.4 you can use same name Application for.

    Include the tags when you do find and replace all to avoid changing other fields with similar information, but different tags.

    It is kind of a sluggish way to do it. If anyone knows a better way, I am all ears.

    Another option, which I am not fond of, is to simply include all the possible perfcounters in your existing template, then go to each individual server and disable the ones that are not supported for that server. But then that would apply to templated triggers as well.
    Last edited by tchjts1; 31-03-2015, 08:28.

    Comment

    • kovas
      Member
      • Dec 2012
      • 39

      #3
      sound very complicated, any other simpler solution, something out of the box?

      Comment

      Working...