Capturing Your Own Solaris 11.4 (12) Analytics By Using Remote Administration Daemon (RAD) – Part 5
The full code is available in a GitHub repository. to play with the code, feel free to clone the Solaris Analytics Publisher Repository
This is part 5 out of a series of articles on how to use Oracle Solaris Analytics with your own custom application(s).
- part 1 how to configure analytics
- part 2 how to configure the client capture stat process
- part 3 how to publish the client captured stats.
- part 4 Configuring / Accessing the Web Dashboard / UI.
- part 5 Capturing Solaris 11.4 (12) Analytics By Using Remote Administration Daemon (RAD).
Below is an updated on Capturing Solaris 11.4+ Analytics.
In part 1-4
my configuration used a SQLite Database to store local Stats/Analytics data. I then used a Python HTTP daemon to publish and make the results available for a remote Stats store host.
In this update, the capture / publish process is greatly enhanced, I completely eliminated the need for a SQLite DB and or a Python HTTP server. while the need for SQLite and Python HTTP is still required on pre Solaris 11.4 hosts, its now totally unnecessary on Solaris 11.4+ hosts.
Lets jump right in to the details.
All the latest code is available on the GitHub Repository
Capturing Stats – Version 0.2
This update significantly enhances Analytics collection on Solaris 11.4+(12).
- Removed the need for an extra Python HTTP server to gather remote analytics (this is still needed for pre s11.4 clients).
- Removed the need for a local SQLite Database (this is still needed for pre s11.4 clients).
- Updated all REST API calls to use Solars Remote Administration Demon(RAD) Authentication.
The new version only needs one service/demon to run on the remote node.
All data captured is stored in the local Stats Store.
The remote Stats Store central server queries / pulls from all the remote client.
The install adds two new SMF services and two new Python applications.
First Copy the Stats Store (sstore) custom json files to the stats directory.
cp /opt/sys_monitor/statsSrc/*.json /usr/lib/sstore/metadata/json/site
Now, restart the Stats Store service for the new stats to be available.
svcadm restart svc:/system/sstore:default
There are two applications included, a client and a server.
- The client process:
The client process is used to collect / capture Analytics data, this data will be stored in the local Stats Store.
- The server process:
The server process will fetch Analytics/Stats Store data from a list of remote clients and publish the results in the local central Stats Store.
I am not posting any of the code below, because all the code is available on Github
Now, to use Analytics sample application, follow the steps below.
- Clone the git repository in to /opt/sys_monitor with git clone. for example, git clone https://github.com/elik1001/solaris-analytics-publisher
- Modify /opt/sys_monitor/bin/capture_from_local-s11_4.py, replace disks1/sd1 and disk2/sd4 with your sd device – you can find your device(s) with iostat -xc (left col).
- Modify /opt/sys_monitor/bin/capture_from_local-s11_4.py, replace net1/interface1 and disk2/interface2 with your network device – you can find your device(s) with ipadm.
- Modify /opt/sys_monitor/bin/pull_from_remote-s11_4.py, replace user and password with your remote host user and password
- Modify/add you host to /opt/sys_monitor/conf/s12-links.txt, this file contains a list of hosts to fetch data from, the data will then be published to the local central Analytics Stats Store.
- Add/replace password in /opt/sys_monitor/conf/chk_db1_apps-ses.sh and /opt/sys_monitor/conf/test_db1_apps.sh with your MySQL DB password (or if you allow localhost without a password, just remove -p option)
- Optional: Add any (MySQL) required variables to /opt/sys_monitor/conf/set_env
To use the application, you will need to import the SMF services, by running the below..
- Used for local capture:
svccfg import /opt/sys_monitor/services/s11_4-capture_service.xml
- Used for pulling the remote host analytics:
svccfg import /opt/sys_monitor/services/s11_4-pull_from_remote.xml
You can run both Solaris 11.4
and pre Solaris 11.4
services simultaneously (this is only needed if you have s11.4+ and pre s11.4 hosts).
Make sure the services are up and running, by running the below.
svcs svc:/application/monitor/s11_4-local_stats_capture:default svc:/application/monitor/s11_4-remote_stats_capture:default
STATE STIME FMRI
online 17:24:45 svc:/application/monitor/s11_4-local_stats_capture:default
online 17:24:45 svc:/application/monitor/s11_4-remote_stats_capture:default
You are now ready to setup stats on the Solaris BUI/GUI dashboard.
Login to https://localhost:6787/
The rest of the process is the same as in part 4
For a full walkthrue and how to configure the Solaris BUI/GUI dashboard, please check out part 4
You might also like – Articles related to Oracle Solaris 11.4/Solaris 12
Like what you’re reading? please provide feedback, any feedback is appreciated.