You are here

Blog

End-to-end monitoring using "Nested keywords"

End to End Monitoring with Nested KeywordsScenario:

A customer contacted us with a requirement to monitor the functional status of their website and all its vital components to ensure continued availability. The customer needed to be alerted when any of the website components (separated into groups) went into a critical state.

We helped them set up a master service/check for their company website using nested keywords, so that if a group of components fails, the 'company website' check in Opsview goes into a warning state.

Setup:

Group Components Warning Critical
Web Server Cluster 4 web servers 2+ failures 4 failures
Database Server Cluster 2 database servers 1 failure 2 failures
Load Balancer Cluster 2 load balancers 1 failure 2 failures

Instructions:

Step 1: “Additions"

  1. Add the 4 web servers to Opsview; in this example they are called “Webserver001”, “Webserver002”, “Webserver003” and “Webserver004”.

  2. Add the 2 database servers to Opsview; in this example they are called “Database001” and “Database002”.
  3. Add the 2 load balancers to Opsview; in this example they are called “LB001” and “LB002”.
  4. Add a host called “KeywordsHost”, with “0” in the check interval. This is a “holding container” host, rather than an actual host - and will be used to contain the logic we will use to achieve our desired setup.

Step 2: “Keywords 0.1”

end to end monitoring keywords

  1. Create a keyword called “Webserversall” and add all 4 web servers (Webserver001-004). .
  2. Create a keyword called “Databasesall” and add both databases (Database001 and Database002). 
  3. Create a keyword called ”Loadbalancersall” and add both load balancers (LB001 and LB002).

Step 3: “Service checks 0.1”

end to end monitoring service checks

HEALTH  - WEB SERVERS

  1. Create a new service check called “Health - Web Servers”.
  2. Select the plugin as “check_opsview_keyword”, and specify the arguments as
    -k Webserversall --algorithm=percent_ok --percent_critical=@0 --percent_warning=@50:99”.

HEALTH - DATABASE SERVERS

  1. Create a new service check called “Health - Database Servers”.
  2. Select the plugin as “check_opsview_keyword”, and specify the arguments as
    -k Databasesall --algorithm=percent_ok --percent_critical=@0 --percent_warning=@50:99”.

HEALTH - LOAD BALANCERS

  1. Create a new service check called &ldquoHealth - Load Balancers”.
  2. Select the plugin as “check_opsview_keyword”, and specify the arguments as
    -k Loadbalancersall --algorithm=percent_ok --percent_critical=@0 --percent_warning=@50:99”.

Apply these 3 new service checks to our host “KeywordsHost”, and reload Opsview.

Step 4: “Keywords 0.2”

WEBSERVERS

  1. Create a new keyword called “Webservers” - set the keyword view to “enable”, and then set the description as “Web Server Health”.
  2. Under objects, select the “KeywordsHost” as the host, and in “Service checks” click “Filter by selected hosts”.
  3. Finally, select “Health - Web Servers” and submit.

DATABASES

  1. Create a new keyword called “Databases” - set the keyword view to “enable”, and then set the description as “Database Server Health”.
  2. Under objects, select the “KeywordsHost” as the host, and in “Service checks” click “Filter by selected hosts”.
  3. Finally, select “Health - Database Servers” and submit.

LOADBALANCERS

  1. Create a new keyword called “Loadbalancers” - set the keyword view to “enable”, and then set the description as “Load Balancer Health”.
  2. Under objects, select the “KeywordsHost” as the host, and in “Service checks” click “Filter by selected hosts”.
  3. Finally, select “Health - Load Balancers” and submit.

We now have a keyword for each of our clusters, that will go warning and critical depending on the health of the cluster, i.e. if 2 web servers fail, the “Web Server Health” keyword will go to warning (Yellow) as specified in the desired setup.

end to end monitoring keywords

Step 5: “Website keyword/wrap-up”

  1. Create a new keyword called “Company” and set the keyword view to “enable”. Now set the description to “Company website”.
  2. Next, on objects, select the “KeywordsHost” as the host, and in “Service checks” click “Filter by selected hosts”.
  3. Finally, add all 3 of our “Health -“ service checks (Load Balancers, Database Servers and Web Servers) and click submit.

We now have a keyword showing the Company website status and if any of the clusters underneath the website go to critical or warning, the entire Company website keyword will go critical.

Reload Opsview, and the system is set up successfully.

Get unified insight into your IT operations with Opsview Monitor

webteam's picture
by Opsview Team,
Administrator
Opsview is passionately focused on monitoring that enables DevOps teams to deliver smarter business services, faster.

More like this

Nov 25, 2014
Blog
By Opsview Team, Administrator

This blog is written by Sam Marsh, Product Manager at Opsview.

Feb 08, 2012
Blog
By Opsview Team, Administrator

Website monitoring checks can be set up quickly and easily in Opsview giving you powerful alerting capabilities to check on crashed servers,...

Feb 05, 2016
Whitepapers
By Opsview Team, Administrator

At Opsview, like in many other IT monitoring and Application Performance Management companies, we like to talk about the next generation of...