Ad Widget

Collapse

Discovery - Item prototypes - Perfmon Problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scottca
    Junior Member
    • Apr 2013
    • 5

    #1

    Discovery - Item prototypes - Perfmon Problems

    Hi All,

    Hope you can help.

    I have created a powershell script which retrieves the Microsoft SQL Instances that are installed on the machine and also the dabases within them.

    They are stored as 2 Variables and the response and is output with the required JSON format.

    The 2 variables are #MSSQLINSTANCE and #MSSQLDBNAME

    Everything seems to work well and I can use a single variable in my item prototypes, however when I try and use 2 variables it doesnt work.

    For instance...

    If I create a perfmon counter

    perf_counter["\MSSQL${#MSSQLINSTANCE}atabases(_Total)\Log File(s) Size (KB)"]

    It works ok, I get the Databases(_Total) monitored for each of my instances.

    Likewise if I set it up as

    perf_counter["\MSSQL$INST1Databases({#MSSQLDBNAME})\Log File(s) Size (KB)"]

    I get the individual database log file size monitored for instance INST1

    So I know both variables work.. however when I try and combine the two:

    perf_counter["\MSSQL${#MSSQLINSTANCE}atabases({#MSSQLDBNAME})\Log File(s) Size (KB)"]

    It doesnt work ? I want it to monitor the databases returned in MSSQLDBNAME if they exist on instance MSSQLINSTANCE

    Can anyone help?

    Kind Regards,

    Craig
  • scottca
    Junior Member
    • Apr 2013
    • 5

    #2
    Hi All,

    Is anyone able to help me on this one?

    Thanks in advance.

    Craig

    Comment

    Working...