-------- Oprindelig meddelelse --------
Fra: "Orlebeck, Geoffrey" <[email protected]>
Dato: 26/11/2015 00.16 (GMT+01:00)
Til: "'[email protected]'" <[email protected]>
Emne: RE: [msmom] RE: Alert Parameter Replacement: Service Name
If you could share an example, I would sincerely appreciate it. I’m in the US, so we have Thanksgiving holiday tomorrow, but I will take a look when I’m back in the office on Friday.
Thank you.
Geoff
From: [email protected] [mailto:[email protected]]
On Behalf Of Henrik Andersen
Sent: Wednesday, November 25, 2015 3:09 PM
To: [email protected]
Subject: RE: [msmom] RE: Alert Parameter Replacement: Service Name
Ok, Then I will advice you to create a discovery that discovers an instance of a class which has the service name/display name as a property.
I can post an example you can use as a template. But it will be tomorrow (I'm on GMT+1)
/Henrik
Sendt fra min Samsung-enhed
-------- Oprindelig meddelelse --------
Fra: "Orlebeck, Geoffrey" <[email protected]>
Dato: 25/11/2015 23.29 (GMT+01:00)
Til: "'[email protected]'" <[email protected]>
Emne: [msmom] RE: Alert Parameter Replacement: Service Name
Henrik,
Thank you for the information. Excuse me if I’m not grasping the last sentence. When I create the monitor, it is for different services. So for this example it was ‘Spooler’, but each service name is different. I was hoping I could achieve the same functionality with the service name as I do with the hostname—I don’t have to define the hostname in the Alert Description, the Parameter will replace it with the appropriate value. I’m trying to cut down on the hard-coding within the MPs because it requires more modifications when changes are made, and is not as efficient.
I was hoping I could do something like:
Service ‘<Insert Paramter>’ is not running on $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$.This would allow me to copy monitors in Visual Studio and not have to go into each description and update it with the hard-coded service name. Is that possible with the way I’m authoring these monitors?
Thanks,
Geoff
From:
[email protected] [mailto:[email protected]]
On Behalf Of Henrik Andersen
Sent: Wednesday, November 25, 2015 1:21 PM
To: [email protected]
Subject: [msmom] SV: Alert Parameter Replacement: Service Name
Yes, it can be challengingJ But if you use $Target/Property[Type="Microsoft.SystemCenter.NTService"]/DisplayName$ it has to be a property of the target(class) that you target.
In your case, you’ve written ‘spooler’ as a parameter for the monitor. You could do the easy thing: Write ‘spooler’(or anything else) as alert parameter.
|
Venlig hilsen |
|||||||
|
Henrik Andersen |
|||||||
|
Tools |
|||||||
|
Direkte +4563636158 |
|||||||
|
Mobile +4521579037 |
|||||||
|
JN Data A/S |
· |
Havsteensvej 4 |
· |
4000 Roskilde |
|
|
Telefon 63 63 63 63/ Fax 63 63 63 64 |
|||||
Fra:
[email protected] [mailto:[email protected]]
På vegne af Orlebeck, Geoffrey
Sendt: 25. november 2015 22:00
Til: '[email protected]'
Emne: [msmom] RE: Alert Parameter Replacement: Service Name
No, it is not derived from there, it is hosted by the Microsoft computer role. I still lack a lot of the in-depth relational knowledge within SCOM.
I am using TypeID="Windows!Microsoft.Windows.CheckNTServiceStateMonitorType" to target the service like this:
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<ServiceName>Spooler</ServiceName>
<CheckStartupType>true</CheckStartupType>
</Configuration>
I’m not sure where to begin on the Alert Parameter. How could I fill in the <AlertParameter> for the service name? I know see the error of trying to use Microsoft.SystemCenter.NTService, but I’m not sure how to go about targeting the Alert Parameter at the service name. Any relevant links or examples? I have tried looking online, but there isn’t a lot of resources on the MP Authoring side of SCOM.
Thanks,
Geoff
From:
[email protected] [mailto:[email protected]]
On Behalf Of Henrik Andersen
Sent: Wednesday, November 25, 2015 12:31 PM
To: [email protected]
Subject: [msmom] SV: Alert Parameter Replacement: Service Name
Hi!,
You are targeting Acme.Application.AppServerRole How are that class defined? Is it derived from Microsoft.SystemCenter.NTService?
If not, the statement $Target/Property[Type="Microsoft.SystemCenter.NTService"]/DisplayName$ has no meaning at all.
/Henrik
Fra:
[email protected] [mailto:[email protected]]
På vegne af Orlebeck, Geoffrey
Sendt: 25. november 2015 19:19
Til: '[email protected]'
Emne: [msmom] Alert Parameter Replacement: Service Name
All:
Goal: Get the Service Name passed as a parameter into the Alert Description. I have the server name working, but whatever I try for the service name results in blank output.
Issue:
I am authoring an unit monitor in Visual Studio using “Windows!Microsoft.Windows.CheckNTServiceStateMonitorType”). The alert parameter “$Target/Property[Type="Microsoft.SystemCenter.NTService"]/DisplayName$” results in a blank output in the Alert Description. I created a service monitor in the SCOM console and exported that to XML in order to determine what Alert Parameter is being used—and it’s the one listed above. However, when I am insert it into my MP, the Alert Parameter is blank in the Alert Description when the alert is generated. Below is the relevant MP code (scrubbed).
<ManagementPackFragment SchemaVersion="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Monitoring>
<Monitors>
<UnitMonitor ID="Acme.Application.Monitor.Spooler.ServiceRunning" Accessibility="Public" Enabled="true" Target="Acme.Application.AppServerRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.CheckNTServiceStateMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Acme.Application.Monitor.Spooler.ServiceRunning.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="Microsoft.SystemCenter.NTService"]/DisplayName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Running" MonitorTypeStateID="Running" HealthState="Success" />
<OperationalState ID="NotRunning" MonitorTypeStateID="NotRunning" HealthState="Error" />
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<ServiceName>Spooler</ServiceName>
<CheckStartupType>true</CheckStartupType>
</Configuration>
</UnitMonitor>
</Monitors>
</Monitoring>
<Presentation<s< body=""></s<>
&nb
