SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
Sling  health  checks      -­‐      Bertrand  Delacretaz
Tamingyour

AEMinstances
withthe

ApacheSling
HealthCheckTools
BertrandDelacrétaz

PrincipalScientist,AdobeCQ/AEMR&Dteam,Basel
ApacheSlingcommitter,ASFMemberand(current)Director

@bdelacretaz-grep.codeconsult.ch
AEMHubLondon,April2014
slidesrevision2014-04–09,atslideshare.net/bdelacretaz
Sling  health  checks      -­‐      Bertrand  Delacretaz
picture: anitapeppers on
morguefile.com
How  can  you  trust  your  
current  (fragile?)  
combina?on  of  OSGi  
bundles  and  configs?  
!
It  needs  live  
TESTING.  
Sling  health  checks      -­‐      Bertrand  Delacretaz
Test  code  in  my  produc?on  instance?
picture: melschmitz on morguefile.com
Sling  health  checks      -­‐      Bertrand  Delacretaz
whatdowemeanby

Health
Checks?
Sling  health  checks      -­‐      Bertrand  Delacretaz
Health  Checks?
public interface HealthCheck {
Result execute();
}
public class Result {
public boolean isOk() ...
public Status getStatus() ...
public Iterator<ResultLog.Entry> iterator() ...
}
HealthCheck

OSGi services
Serviceprops:

name,MBean,tags
Sling  health  checks      -­‐      Bertrand  Delacretaz
Webconsoleand
JMX
Sling  health  checks      -­‐      Bertrand  Delacretaz
Webconsole  /system/console/healthcheck
Sling  health  checks      -­‐      Bertrand  Delacretaz
Health  Check  MBeans  (auto-­‐created)
Serviceprops

:
name,MBean,tags
Sling  health  checks      -­‐      Bertrand  Delacretaz
Health  Checks  as  JMX  Processors
MBean
MBean
MBean
HC
HC
HC
using expressions like

jmx.attribute('java.lang:type=ClassLoading', 'LoadedClassCount') > 10 



&&
jmx.attribute('java.lang:type=Runtime', 'ManagementSpecVersion') > 1
Sling  health  checks      -­‐      Bertrand  Delacretaz
JMX  ResourceProvider
curl
http://localhost:8080/system/sling/monitoring/mbeans/...queriesStatus.tidy.2.json
{
"mbean:objectName": 

“org.apache.sling.healthcheck:name=qs,type=HealthCheck",
"sling:resourceType": "sling:mbean",
"hc.name": "Query Performance",
"mbean:description": "Health check",
"status": "OK",
"log": …
Sling  health  checks      -­‐      Bertrand  Delacretaz
herecomesthe

big(?)






demo!
(webconsole,JMX,configuration)
Sling  health  checks      -­‐      Bertrand  Delacretaz
typicalUseCases
Sling  health  checks      -­‐      Bertrand  Delacretaz
Typical  Use  Cases
System status
Allbundlesup?
Initialcontentready?
Diskspaceok?
Externalservicesok?
Loadwithinbounds?(forjobs)
Performance
Requestspersecondok?
Requestdurationok?
Freememoryok?
Replicationqueuesok?
Configuration
Securitychecklistok?
Defaultaccountsdisabled?
Democontentremoved?
Self-test
Startupsmoketests?
Keephistoryofresults?
ReporttoHTTPfront-end
http://bit.ly/Qjxh93
TalktoJustinEdelson!
Sling  health  checks      -­‐      Bertrand  Delacretaz
Sling  devops  experiments
https://github.com/bdelacretaz/
sling-devops-vol1
Health checks tell the
cluster controller when a
Sling instance is ready to
be injected in the cluster.
Sling  health  checks      -­‐      Bertrand  Delacretaz
whatdoyouget

Outofthebox?
Sling  health  checks      -­‐      Bertrand  Delacretaz
Out  of  the  Box  -­‐  core
JmxAttributeHealthCheck
ScriptableHealthCheck
CompositeHealthCheck
Single JMX attributes
Script(let)s in any language

using BindingValuesProviders

Run other Health Checks
based on their tags
Sling  health  checks      -­‐      Bertrand  Delacretaz
Out  of  the  box  -­‐  support  bundle
SlingRequestStatusHC
DefaultLoginsHealthCheck
Is my resource there?
Including its scripts?
admin:admin -> fail?
current HC bundles:
org.apache.sling.hc.core
org.apache.sling.hc.support
org.apache.sling.hc.webconsole
org.apache.sling.hc.samples
JUnitHealthCheck
And also:
From the junit.healthcheck bundle
Sling  health  checks      -­‐      Bertrand  Delacretaz
howdoyouwrite

YourownHealth
Checks?
Sling  health  checks      -­‐      Bertrand  Delacretaz
BYOHC  -­‐  Bring  Your  Own  HCs  !
@Component(...policy=ConfigurationPolicy.REQUIRE, metatype=true)
@Service(value=HealthCheck.class)
!
@Property(name=HealthCheck.NAME),
@Property(name=HealthCheck.TAGS,unbounded=PropertyUnbounded.ARRAY),
@Property(name=HealthCheck.MBEAN_NAME)
!
public class MyHealthCheck {
public Result execute() {
FormattingResultLog f = new FormattingResultLog();
...
if(badThings) f.warn(“Something happened with {}”, foo);
return new Result(f);
}
}
Sling  health  checks      -­‐      Bertrand  Delacretaz
HealthChecksExecutor
Sling  health  checks      -­‐      Bertrand  Delacretaz
Health  Check  Executor  Service
public interface HealthCheckExecutor {
!
List<HealthCheckExecutionResult>

execute(String... tags);
!
}
ExecutesHCsselectedbytags,withcaching.
Resultincludesexecutionmetadata,timeoutinfoetc.
Sling  health  checks      -­‐      Bertrand  Delacretaz
docs at sling.apache.org : bundles : health check.
discuss on the Apache Sling dev list.
I’m @bdelacretaz - thanks!
JMX processors
Webconsole
JmxAttributeHealthCheck
ScriptableHealthCheck
CompositeHealthCheck
SlingRequestStatusHC
DefaultLoginsHealthCheck
JUnitHealthCheck
That’s  it!  Have  fun.
@Service(HealthCheck.class)

public class MyHealthCheck {
....generate a Result here…
}

Mais conteúdo relacionado

Semelhante a AEM Sling health checks presentation

Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...Nagios
 
Management of modes and states with Capella
Management of modes and states with CapellaManagement of modes and states with Capella
Management of modes and states with CapellaObeo
 
Dave Karow, Split. Powering Progressive Delivery With Data
Dave Karow, Split. Powering Progressive Delivery With DataDave Karow, Split. Powering Progressive Delivery With Data
Dave Karow, Split. Powering Progressive Delivery With DataIT Arena
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationArnaud Héritier
 
Code Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application MigrationsCode Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application MigrationsDana Luther
 
Agile Days Twin Cities 2011
Agile Days Twin Cities 2011Agile Days Twin Cities 2011
Agile Days Twin Cities 2011Brian Repko
 
testing for people who hate testing
testing for people who hate testingtesting for people who hate testing
testing for people who hate testingBram Vogelaar
 
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys PROIDEA
 
AdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
AdaCore Paris Tech Day 2016: Eric Perlade - Verification SolutionsAdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
AdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutionsjamieayre
 
DevSecOps and the CI/CD Pipeline
 DevSecOps and the CI/CD Pipeline DevSecOps and the CI/CD Pipeline
DevSecOps and the CI/CD PipelineJames Wickett
 
Introduction to Arquillian framework
Introduction to Arquillian  frameworkIntroduction to Arquillian  framework
Introduction to Arquillian frameworkKarthikeyan Annamalai
 
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOpsPVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOpsAndrey Karpov
 
Buying a Ferrari for your teenager? You may want to think twice
Buying a Ferrari for your teenager? You may want to think twiceBuying a Ferrari for your teenager? You may want to think twice
Buying a Ferrari for your teenager? You may want to think twiceAl Zindiq
 
Hyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkitHyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkit7mind
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django ApplicationsGareth Rushgrove
 
Pragmatic Pipeline Security
Pragmatic Pipeline SecurityPragmatic Pipeline Security
Pragmatic Pipeline SecurityJames Wickett
 
PyParis2018 - Python tooling for continuous deployment
PyParis2018 - Python tooling for continuous deploymentPyParis2018 - Python tooling for continuous deployment
PyParis2018 - Python tooling for continuous deploymentArthur Lutz
 
Integration Testing on Steroids: Run Your Tests on the Real Things
Integration Testing on Steroids: Run Your Tests on the Real ThingsIntegration Testing on Steroids: Run Your Tests on the Real Things
Integration Testing on Steroids: Run Your Tests on the Real ThingsAtlassian
 

Semelhante a AEM Sling health checks presentation (20)

Chaos is a ladder !
Chaos is a ladder !Chaos is a ladder !
Chaos is a ladder !
 
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
Nagios Conference 2011 - Nathan Vonnahme - Integrating Nagios With Test Drive...
 
Management of modes and states with Capella
Management of modes and states with CapellaManagement of modes and states with Capella
Management of modes and states with Capella
 
Dave Karow, Split. Powering Progressive Delivery With Data
Dave Karow, Split. Powering Progressive Delivery With DataDave Karow, Split. Powering Progressive Delivery With Data
Dave Karow, Split. Powering Progressive Delivery With Data
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentation
 
Code Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application MigrationsCode Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application Migrations
 
Agile Days Twin Cities 2011
Agile Days Twin Cities 2011Agile Days Twin Cities 2011
Agile Days Twin Cities 2011
 
testing for people who hate testing
testing for people who hate testingtesting for people who hate testing
testing for people who hate testing
 
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys
JDD 2016 - Bartosz Majsak - Meet The Assertable Chaos Monkeys
 
AdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
AdaCore Paris Tech Day 2016: Eric Perlade - Verification SolutionsAdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
AdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
 
DevSecOps and the CI/CD Pipeline
 DevSecOps and the CI/CD Pipeline DevSecOps and the CI/CD Pipeline
DevSecOps and the CI/CD Pipeline
 
Introduction to Arquillian framework
Introduction to Arquillian  frameworkIntroduction to Arquillian  framework
Introduction to Arquillian framework
 
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOpsPVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps
PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps
 
Ms arch dev-ops
Ms arch dev-opsMs arch dev-ops
Ms arch dev-ops
 
Buying a Ferrari for your teenager? You may want to think twice
Buying a Ferrari for your teenager? You may want to think twiceBuying a Ferrari for your teenager? You may want to think twice
Buying a Ferrari for your teenager? You may want to think twice
 
Hyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkitHyper-pragmatic Pure FP testing with distage-testkit
Hyper-pragmatic Pure FP testing with distage-testkit
 
Testing Django Applications
Testing Django ApplicationsTesting Django Applications
Testing Django Applications
 
Pragmatic Pipeline Security
Pragmatic Pipeline SecurityPragmatic Pipeline Security
Pragmatic Pipeline Security
 
PyParis2018 - Python tooling for continuous deployment
PyParis2018 - Python tooling for continuous deploymentPyParis2018 - Python tooling for continuous deployment
PyParis2018 - Python tooling for continuous deployment
 
Integration Testing on Steroids: Run Your Tests on the Real Things
Integration Testing on Steroids: Run Your Tests on the Real ThingsIntegration Testing on Steroids: Run Your Tests on the Real Things
Integration Testing on Steroids: Run Your Tests on the Real Things
 

Mais de AEM HUB

Microservices for AEM by Maciej Majchrzak
Microservices for AEM by Maciej MajchrzakMicroservices for AEM by Maciej Majchrzak
Microservices for AEM by Maciej MajchrzakAEM HUB
 
When dispatcher caching is not enough by Jakub Wądołowski
When dispatcher caching is not enough by Jakub WądołowskiWhen dispatcher caching is not enough by Jakub Wądołowski
When dispatcher caching is not enough by Jakub WądołowskiAEM HUB
 
Sling Models Using Sightly and JSP by Deepak Khetawat
Sling Models Using Sightly and JSP by Deepak KhetawatSling Models Using Sightly and JSP by Deepak Khetawat
Sling Models Using Sightly and JSP by Deepak KhetawatAEM HUB
 
PhoneGap Enterprise Viewer by Anthony Rumsey
PhoneGap Enterprise Viewer by Anthony RumseyPhoneGap Enterprise Viewer by Anthony Rumsey
PhoneGap Enterprise Viewer by Anthony RumseyAEM HUB
 
Integrating Apache Wookie with AEM by Rima Mittal and Ankit Gubrani
Integrating Apache Wookie with AEM by Rima Mittal and Ankit GubraniIntegrating Apache Wookie with AEM by Rima Mittal and Ankit Gubrani
Integrating Apache Wookie with AEM by Rima Mittal and Ankit GubraniAEM HUB
 
Mastering the Sling Rewriter by Justin Edelson
Mastering the Sling Rewriter by Justin EdelsonMastering the Sling Rewriter by Justin Edelson
Mastering the Sling Rewriter by Justin EdelsonAEM HUB
 
Building Quality into the AEM Publication Workflow with Active Standards by D...
Building Quality into the AEM Publication Workflow with Active Standards by D...Building Quality into the AEM Publication Workflow with Active Standards by D...
Building Quality into the AEM Publication Workflow with Active Standards by D...AEM HUB
 
Touching the AEM component dialog by Mateusz Chromiński
Touching the AEM component dialog by Mateusz ChromińskiTouching the AEM component dialog by Mateusz Chromiński
Touching the AEM component dialog by Mateusz ChromińskiAEM HUB
 
How to build a Social Intranet with Adobe Sites and 3rd Party products ... us...
How to build a Social Intranet with Adobe Sites and 3rd Party products ... us...How to build a Social Intranet with Adobe Sites and 3rd Party products ... us...
How to build a Social Intranet with Adobe Sites and 3rd Party products ... us...AEM HUB
 
How do you build flexible platforms that focuses on business needs? by Fahim...
How do you build flexible platforms that focuses on business needs?  by Fahim...How do you build flexible platforms that focuses on business needs?  by Fahim...
How do you build flexible platforms that focuses on business needs? by Fahim...AEM HUB
 
AEM Apps Enhanced: In-app Messaging and Beacons by John Fait
AEM Apps Enhanced: In-app Messaging and Beacons by John FaitAEM Apps Enhanced: In-app Messaging and Beacons by John Fait
AEM Apps Enhanced: In-app Messaging and Beacons by John FaitAEM HUB
 
Effectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto LeiteEffectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto LeiteAEM HUB
 
Adobe Managed Services: Complicated Cloud Deployments by Adam Pazik, Mike Til...
Adobe Managed Services: Complicated Cloud Deployments by Adam Pazik, Mike Til...Adobe Managed Services: Complicated Cloud Deployments by Adam Pazik, Mike Til...
Adobe Managed Services: Complicated Cloud Deployments by Adam Pazik, Mike Til...AEM HUB
 
Adobe Marketing Cloud Integrations: Myth or Reality? by Holger Marsen
Adobe Marketing Cloud Integrations: Myth or Reality? by Holger MarsenAdobe Marketing Cloud Integrations: Myth or Reality? by Holger Marsen
Adobe Marketing Cloud Integrations: Myth or Reality? by Holger MarsenAEM HUB
 
Responsive Websites and Grid-Based Layouts by Gabriel Walt
Responsive Websites and Grid-Based Layouts by Gabriel Walt Responsive Websites and Grid-Based Layouts by Gabriel Walt
Responsive Websites and Grid-Based Layouts by Gabriel Walt AEM HUB
 
When Sightly Meets Slice by Tomasz Niedźwiedź
When Sightly Meets Slice by Tomasz NiedźwiedźWhen Sightly Meets Slice by Tomasz Niedźwiedź
When Sightly Meets Slice by Tomasz NiedźwiedźAEM HUB
 
Creativity without comprise by Cleve Gibbon
Creativity without comprise by Cleve Gibbon Creativity without comprise by Cleve Gibbon
Creativity without comprise by Cleve Gibbon AEM HUB
 
REST in AEM by Roy Fielding
REST in AEM by Roy FieldingREST in AEM by Roy Fielding
REST in AEM by Roy FieldingAEM HUB
 
Adobe Summit 2015 - Penguin Random House - Accelerating Digital Transformation
Adobe Summit 2015 - Penguin Random House - Accelerating Digital TransformationAdobe Summit 2015 - Penguin Random House - Accelerating Digital Transformation
Adobe Summit 2015 - Penguin Random House - Accelerating Digital TransformationAEM HUB
 
Socialize your Exceptional Web Experience – Adobe AEM & IBM Connections by He...
Socialize your Exceptional Web Experience – Adobe AEM & IBM Connections by He...Socialize your Exceptional Web Experience – Adobe AEM & IBM Connections by He...
Socialize your Exceptional Web Experience – Adobe AEM & IBM Connections by He...AEM HUB
 

Mais de AEM HUB (20)

Microservices for AEM by Maciej Majchrzak
Microservices for AEM by Maciej MajchrzakMicroservices for AEM by Maciej Majchrzak
Microservices for AEM by Maciej Majchrzak
 
When dispatcher caching is not enough by Jakub Wądołowski
When dispatcher caching is not enough by Jakub WądołowskiWhen dispatcher caching is not enough by Jakub Wądołowski
When dispatcher caching is not enough by Jakub Wądołowski
 
Sling Models Using Sightly and JSP by Deepak Khetawat
Sling Models Using Sightly and JSP by Deepak KhetawatSling Models Using Sightly and JSP by Deepak Khetawat
Sling Models Using Sightly and JSP by Deepak Khetawat
 
PhoneGap Enterprise Viewer by Anthony Rumsey
PhoneGap Enterprise Viewer by Anthony RumseyPhoneGap Enterprise Viewer by Anthony Rumsey
PhoneGap Enterprise Viewer by Anthony Rumsey
 
Integrating Apache Wookie with AEM by Rima Mittal and Ankit Gubrani
Integrating Apache Wookie with AEM by Rima Mittal and Ankit GubraniIntegrating Apache Wookie with AEM by Rima Mittal and Ankit Gubrani
Integrating Apache Wookie with AEM by Rima Mittal and Ankit Gubrani
 
Mastering the Sling Rewriter by Justin Edelson
Mastering the Sling Rewriter by Justin EdelsonMastering the Sling Rewriter by Justin Edelson
Mastering the Sling Rewriter by Justin Edelson
 
Building Quality into the AEM Publication Workflow with Active Standards by D...
Building Quality into the AEM Publication Workflow with Active Standards by D...Building Quality into the AEM Publication Workflow with Active Standards by D...
Building Quality into the AEM Publication Workflow with Active Standards by D...
 
Touching the AEM component dialog by Mateusz Chromiński
Touching the AEM component dialog by Mateusz ChromińskiTouching the AEM component dialog by Mateusz Chromiński
Touching the AEM component dialog by Mateusz Chromiński
 
How to build a Social Intranet with Adobe Sites and 3rd Party products ... us...
How to build a Social Intranet with Adobe Sites and 3rd Party products ... us...How to build a Social Intranet with Adobe Sites and 3rd Party products ... us...
How to build a Social Intranet with Adobe Sites and 3rd Party products ... us...
 
How do you build flexible platforms that focuses on business needs? by Fahim...
How do you build flexible platforms that focuses on business needs?  by Fahim...How do you build flexible platforms that focuses on business needs?  by Fahim...
How do you build flexible platforms that focuses on business needs? by Fahim...
 
AEM Apps Enhanced: In-app Messaging and Beacons by John Fait
AEM Apps Enhanced: In-app Messaging and Beacons by John FaitAEM Apps Enhanced: In-app Messaging and Beacons by John Fait
AEM Apps Enhanced: In-app Messaging and Beacons by John Fait
 
Effectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto LeiteEffectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto Leite
 
Adobe Managed Services: Complicated Cloud Deployments by Adam Pazik, Mike Til...
Adobe Managed Services: Complicated Cloud Deployments by Adam Pazik, Mike Til...Adobe Managed Services: Complicated Cloud Deployments by Adam Pazik, Mike Til...
Adobe Managed Services: Complicated Cloud Deployments by Adam Pazik, Mike Til...
 
Adobe Marketing Cloud Integrations: Myth or Reality? by Holger Marsen
Adobe Marketing Cloud Integrations: Myth or Reality? by Holger MarsenAdobe Marketing Cloud Integrations: Myth or Reality? by Holger Marsen
Adobe Marketing Cloud Integrations: Myth or Reality? by Holger Marsen
 
Responsive Websites and Grid-Based Layouts by Gabriel Walt
Responsive Websites and Grid-Based Layouts by Gabriel Walt Responsive Websites and Grid-Based Layouts by Gabriel Walt
Responsive Websites and Grid-Based Layouts by Gabriel Walt
 
When Sightly Meets Slice by Tomasz Niedźwiedź
When Sightly Meets Slice by Tomasz NiedźwiedźWhen Sightly Meets Slice by Tomasz Niedźwiedź
When Sightly Meets Slice by Tomasz Niedźwiedź
 
Creativity without comprise by Cleve Gibbon
Creativity without comprise by Cleve Gibbon Creativity without comprise by Cleve Gibbon
Creativity without comprise by Cleve Gibbon
 
REST in AEM by Roy Fielding
REST in AEM by Roy FieldingREST in AEM by Roy Fielding
REST in AEM by Roy Fielding
 
Adobe Summit 2015 - Penguin Random House - Accelerating Digital Transformation
Adobe Summit 2015 - Penguin Random House - Accelerating Digital TransformationAdobe Summit 2015 - Penguin Random House - Accelerating Digital Transformation
Adobe Summit 2015 - Penguin Random House - Accelerating Digital Transformation
 
Socialize your Exceptional Web Experience – Adobe AEM & IBM Connections by He...
Socialize your Exceptional Web Experience – Adobe AEM & IBM Connections by He...Socialize your Exceptional Web Experience – Adobe AEM & IBM Connections by He...
Socialize your Exceptional Web Experience – Adobe AEM & IBM Connections by He...
 

Último

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Último (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

AEM Sling health checks presentation

  • 1. Sling  health  checks      -­‐      Bertrand  Delacretaz Tamingyour
 AEMinstances withthe
 ApacheSling HealthCheckTools BertrandDelacrétaz
 PrincipalScientist,AdobeCQ/AEMR&Dteam,Basel ApacheSlingcommitter,ASFMemberand(current)Director
 @bdelacretaz-grep.codeconsult.ch AEMHubLondon,April2014 slidesrevision2014-04–09,atslideshare.net/bdelacretaz
  • 2. Sling  health  checks      -­‐      Bertrand  Delacretaz picture: anitapeppers on morguefile.com How  can  you  trust  your   current  (fragile?)   combina?on  of  OSGi   bundles  and  configs?   ! It  needs  live   TESTING.  
  • 3. Sling  health  checks      -­‐      Bertrand  Delacretaz Test  code  in  my  produc?on  instance? picture: melschmitz on morguefile.com
  • 4. Sling  health  checks      -­‐      Bertrand  Delacretaz whatdowemeanby
 Health Checks?
  • 5. Sling  health  checks      -­‐      Bertrand  Delacretaz Health  Checks? public interface HealthCheck { Result execute(); } public class Result { public boolean isOk() ... public Status getStatus() ... public Iterator<ResultLog.Entry> iterator() ... } HealthCheck
 OSGi services Serviceprops:
 name,MBean,tags
  • 6. Sling  health  checks      -­‐      Bertrand  Delacretaz Webconsoleand JMX
  • 7. Sling  health  checks      -­‐      Bertrand  Delacretaz Webconsole  /system/console/healthcheck
  • 8. Sling  health  checks      -­‐      Bertrand  Delacretaz Health  Check  MBeans  (auto-­‐created) Serviceprops
 : name,MBean,tags
  • 9. Sling  health  checks      -­‐      Bertrand  Delacretaz Health  Checks  as  JMX  Processors MBean MBean MBean HC HC HC using expressions like
 jmx.attribute('java.lang:type=ClassLoading', 'LoadedClassCount') > 10 
 
 && jmx.attribute('java.lang:type=Runtime', 'ManagementSpecVersion') > 1
  • 10. Sling  health  checks      -­‐      Bertrand  Delacretaz JMX  ResourceProvider curl http://localhost:8080/system/sling/monitoring/mbeans/...queriesStatus.tidy.2.json { "mbean:objectName": 
 “org.apache.sling.healthcheck:name=qs,type=HealthCheck", "sling:resourceType": "sling:mbean", "hc.name": "Query Performance", "mbean:description": "Health check", "status": "OK", "log": …
  • 11. Sling  health  checks      -­‐      Bertrand  Delacretaz herecomesthe
 big(?)





 demo! (webconsole,JMX,configuration)
  • 12. Sling  health  checks      -­‐      Bertrand  Delacretaz typicalUseCases
  • 13. Sling  health  checks      -­‐      Bertrand  Delacretaz Typical  Use  Cases System status Allbundlesup? Initialcontentready? Diskspaceok? Externalservicesok? Loadwithinbounds?(forjobs) Performance Requestspersecondok? Requestdurationok? Freememoryok? Replicationqueuesok? Configuration Securitychecklistok? Defaultaccountsdisabled? Democontentremoved? Self-test Startupsmoketests? Keephistoryofresults? ReporttoHTTPfront-end http://bit.ly/Qjxh93 TalktoJustinEdelson!
  • 14. Sling  health  checks      -­‐      Bertrand  Delacretaz Sling  devops  experiments https://github.com/bdelacretaz/ sling-devops-vol1 Health checks tell the cluster controller when a Sling instance is ready to be injected in the cluster.
  • 15. Sling  health  checks      -­‐      Bertrand  Delacretaz whatdoyouget
 Outofthebox?
  • 16. Sling  health  checks      -­‐      Bertrand  Delacretaz Out  of  the  Box  -­‐  core JmxAttributeHealthCheck ScriptableHealthCheck CompositeHealthCheck Single JMX attributes Script(let)s in any language
 using BindingValuesProviders
 Run other Health Checks based on their tags
  • 17. Sling  health  checks      -­‐      Bertrand  Delacretaz Out  of  the  box  -­‐  support  bundle SlingRequestStatusHC DefaultLoginsHealthCheck Is my resource there? Including its scripts? admin:admin -> fail? current HC bundles: org.apache.sling.hc.core org.apache.sling.hc.support org.apache.sling.hc.webconsole org.apache.sling.hc.samples JUnitHealthCheck And also: From the junit.healthcheck bundle
  • 18. Sling  health  checks      -­‐      Bertrand  Delacretaz howdoyouwrite
 YourownHealth Checks?
  • 19. Sling  health  checks      -­‐      Bertrand  Delacretaz BYOHC  -­‐  Bring  Your  Own  HCs  ! @Component(...policy=ConfigurationPolicy.REQUIRE, metatype=true) @Service(value=HealthCheck.class) ! @Property(name=HealthCheck.NAME), @Property(name=HealthCheck.TAGS,unbounded=PropertyUnbounded.ARRAY), @Property(name=HealthCheck.MBEAN_NAME) ! public class MyHealthCheck { public Result execute() { FormattingResultLog f = new FormattingResultLog(); ... if(badThings) f.warn(“Something happened with {}”, foo); return new Result(f); } }
  • 20. Sling  health  checks      -­‐      Bertrand  Delacretaz HealthChecksExecutor
  • 21. Sling  health  checks      -­‐      Bertrand  Delacretaz Health  Check  Executor  Service public interface HealthCheckExecutor { ! List<HealthCheckExecutionResult>
 execute(String... tags); ! } ExecutesHCsselectedbytags,withcaching. Resultincludesexecutionmetadata,timeoutinfoetc.
  • 22. Sling  health  checks      -­‐      Bertrand  Delacretaz docs at sling.apache.org : bundles : health check. discuss on the Apache Sling dev list. I’m @bdelacretaz - thanks! JMX processors Webconsole JmxAttributeHealthCheck ScriptableHealthCheck CompositeHealthCheck SlingRequestStatusHC DefaultLoginsHealthCheck JUnitHealthCheck That’s  it!  Have  fun. @Service(HealthCheck.class)
 public class MyHealthCheck { ....generate a Result here… }