SCOM 2016 – Unix/Linux service monitoring

SCOM 2016 – Unix/Linux service monitoring

Spread the love

Hi all!, today I am going to write about Linux/Unix service monitoring in SCOM 2016. Is really very simple and easy to do and I recommend to you to read my last post about Linux/Unix onboarding in SCOM.

Linux/Unix service monitoring

Pre requisites

Service monitoring

Before configuring the service monitoring, you have to keep in mind that the service that you want to monitor must be running in the Linux/Unix server, if the service is not running you are not going to be able to monitor it.

The first thing that we are have to know is the service name, for that, we go to the Linux server and type the following command to get the list of all the services: sudo service –status-all

The plus sign (+) means that the service is up and the minus sign (-) that the service is down. For this example, we are going to create a unit monitor for the mysql service.

Now that we have the name of the service, we go to the SCOM console > Authoring > Management Pack Objects > Monitors > Right Click > Create a monitor > Unit monitor

In the “Select a Monitor Type” window we expand the Scripting folder > Generic and we are going to create a UNIX/Linux script two state monitor. If we have a Management Pack to save the monitor we select it, and if not, we create it.

In the “General properties” click on Target and select Universal Linux Computer or the target that corresponds according to the server that you want to monitor. Then give a name to the monitor and a description, and select “Availability” as a Parent Monitor and click Next.

In the Scheduler windows, we will configure every how many minutes the monitor will run and click Next.

In the Script Details, we are going to insert the bash script to check the status of the monitor, for that, I use the following script:

#!/bin/bash
service=SERVICENAME
if (( $(ps -ef | grep -v grep | grep $service | wc -l) > 0 ))
then
echo “0”
else
echo “1”
fi

This script will write a 0 if the service is Up or a 1 if the service is down. Change the service variable for the service you want to monitor and click Next.

In Error Expression windows, we change the first parameter to Equal 1

And in Healthy Expression to Does not equal 1

The configure Health window click Next and in Configure Alerts we are going to do the following changes:

  • Select Generate alerts for this monitor.
  • In the Generate an alert box, select The monitor is in a critical health state.
  • Leave the box selected to automatically resolve the alert.
  • In the Alert name box, type MySQL service is not running.
  • Clear the existing text in the Alert description box and type Computer:
  • Click on the ellipse button.
  • Target and then select Network Name.
  • Click OK.
  • In the Alert description box, add a new line and type StdOut: $Data/Context///*[local-name()=”StdOut”]$
  • Click on Create

Alert check

Now we verify that the alert was configured. We go to Monitoring > Unix/Linux Computers > Rick click on the Server > Open Health Explorer

Click on Filter monitors and expand Availability, and there we have our monitor!

Now, go to the Linux server and type the following command: Sudo service mysql stop

Go back to SCOM and wait to get the alert.

 

And that is all! We have the alerts configured every time our service is down!

I hope you like this post and let me know if you have any question! Enjoy it!

 

 

67 thoughts on “SCOM 2016 – Unix/Linux service monitoring

  1. Effеctively boys,? Mommy lastlʏ stated after they had provide you witһ lots of silⅼy concepts of what God did for fun, ?What God actualⅼy ⅼikeѕ іs when people love each other
    and deal with eacxh other like wwe do in our family.? Ꭲһat mаd sese to Lee and Larrү ѕo Lee hugɡed Mommy and Lаrry huɡgeɗ
    dаddy to simply make God hapрy.

  2. Pingback: Google
  3. Pingback: pc app
  4. Pingback: Pinganillo
  5. Pingback: gold necklace
  6. Pingback: top 5 vibrators
  7. Pingback: tiny anal vibrator
  8. Pingback: peak massager
  9. Pingback: website
  10. Pingback: sex movie
  11. Pingback: sex movie
  12. Pingback: work from home job
  13. Pingback: double vibrator
  14. Pingback: exam in delhi
  15. Pingback: hard vibrator
  16. Pingback: india vs srilanka
  17. Pingback: Google
  18. Pingback: vibrator lubricant
  19. Pingback: buy womanizer toy
  20. Pingback: Cracked
  21. Pingback: Realistic dildo
  22. Pingback: john holmes
  23. Pingback: adult love dolls
  24. Pingback: clitoral vibrator
  25. Pingback: anal sex
  26. Pingback: harmonica app
  27. Pingback: charged vibrator
  28. Pingback: mumbai police
  29. Pingback: Xvideos
  30. Pingback: bunny sex toy
  31. Pingback: هاست
  32. Pingback: himedia

Leave a Reply