3

I have a Windows Server 2008 SP2 without a graphical user interface (Windows Azure).

I need to setup an alert for performance counters that reaches some threshold and then run some command (send an alert, email, something).

So far I did find a way to create an alert with logman

logman create alert ContextSwitchAlert -th "\System\Context Switches/sec>100" -el
logman start ContextSwitchAlert

Now I need to assign some task to it. I've found two options, but I was unable to execute neither of them, because of my experience.

  1. create task that is triggered by event from source Microsoft-Windows-Diagnosis-PLA
  2. create task that is executed by alert itself (don't know if this should be exe file or could be bat/cmd)

I don't work much with servers, but this is the single thing I need to do on Windows Azure to get the alerts.

Question: What is the best way to do this? Option 1, 2 or other?

Or is there a way to handle the alert/event from logman in the WebRole class?

I am open to suggestions. Thanks.

2
  • It seems that logman alert runs the task from Task Scheduler list according to its name (ID). So now I need command line for creating the task, that will run email sender or something like that (or push to Azure MSMQ). And also the utility (repeated task) to send the messages) Oct 7, 2011 at 19:09
  • 1
    logman create alert ContextSwitchAlert -th "\System\Context Switches/sec>100" -el -tn "ContextSwitchesTask" Oct 7, 2011 at 19:10

1 Answer 1

2

You can implement a homegrown solution using either option you described - I would suggest option (2) if you go that route - but doing so is a sub-optimal solution.

What you really want is a Monitoring System that watches the performance counters.

Symantec makes the Altiris suite, which has good Windows support. InterMapper also has Windows support, though you may have to customize it to get what you want.
OpenNMS or Nagios are also options but these are traditionally geared more toward Unix environments.

3
  • I know that full blown monitoring system would be more suited, but that would be more complicated to configure for me than just a few command for these alerts by a WinServer expert. I may be upgrading to monitoring system later if really neccessary. Also there is a factor of Windows Azure environment and its accessibility to these monitoring systems. But thanks for the tip. Oct 7, 2011 at 18:54
  • Configuring a monitoring system now, when you have a handful of machines is much easier than when you have a hundred machines. Putting it off is a common thing to do and it almost always means more work later. Also don't be misled into thinking that it's "hard" to monitor the cloud: If you can access it to use/administer it you can access it to monitor it.
    – voretaq7
    Oct 7, 2011 at 19:08
  • Windows Azure monitoring is still very young and I can't find solutions that I could afford/use. I am able to run bat/cmd/exe with admin privileges and I can run sw that is not installed just copied (done with xcopy). (I have single server instance for now) Oct 7, 2011 at 19:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .