1

I have installed and configured check_mk tool. Also, configured its agents on both Windows and Linux servers.

Now, I can monitor things like CPU Utilization. But i want to check whether JBoss is running on server or not. If no, it will trigger an email notification to the particular email id.

How can i achieve this?

Matteo Baldi
  • 5,613
  • 10
  • 39
  • 51
user2781150
  • 179
  • 1
  • 2
  • 10

1 Answers1

0

You can write custom powershell scripts in windows and drop them into the local check_mk folder usually located at "C:\Program Files (x86)\check_mk\local". Once you've dropped the file into this folder you'll need to go into the Check_mk dashboard and add the new monitor to the servers inventory.

Below is a basic service monitor. This will allow you to monitor any service that you'd like. Stats 0=OK, 1=Warning, 2=Critical, 3=Unknown

$serviceName='<any servce name>'
$status=get-service -name $serviceName
$jbossStatus=$status.Status

if ($jbossStatus -eq 'Running') {
    Write-Host "0 jboss_service - Status:" $jbossStatus
} 
else {
    write-host "2 jboss_service - Status: " $jbossStatus  
    }
Ryan Baugh
  • 21
  • 2