Goal services in Solaris 11.4
A disabled service in SMF does nothing. It doesn’t tell you that it’s disabled without being asked. Well … at the end that is is the point of disabling it and the first sentence seems to be self-evident. However this is sometimes a problem. Sometimes you need to know that a services is not disabled because it’s crucial that it is running for normal operation. Or more broadly speaking, sometimes you want or need a single point to check, if all services are running that you need for your system. Out of this reason SMF goal services were introduced in Solaris 11.4 .
They are pretty easy to use: Let’s assume that you considering your system only up and running if sendmail and Apache is running on your system. You can use the build in goal service to monitor this.
As the smtp:sendmail
is usually already active, I will just enable the http:apache24
service here.
In order to configure that the goal of the system is to have svc:/network/smtp:sendmail
and svc:/network/http:apache24
online, I’m using the the goals
subcommand of svcs
As currently both services are up and running the goal will be in the online
state as well.
However as soon, as I’m disabling it, the goal service will transition into the maintenance
state.
This information is not just available with the SMF toolset. It propagates as well into the Fault Management Architecture (FMA):
Now lets’s reenable the http:apache24
service
The goal service transitions back into the online
state. This transition is relayed into the FMA as well.
In my next blog entry i will explain how you can create your own goal services.