Using Red Hat Insights with SQL Server

Red Hat Just make a bunch of announcements at its annual Summit Conference one of these announcements that might have gone un noticed if the Red Hat Insights the Platform for ensuring your system is secure added rules for SQL Server. The announcement was mentioned here but I will give you a demo of how it works. We will start by installing the insights-client on

[root@rhel75_tower ~]# yum install insights-client

After the install is done we will configure insights-client

[root@rhel75_tower ~]# insights-client — register
You successfully registered somenumber to account xxxxx.
Successfully registered host rhel75_tower.localdomain
Automatic scheduling for Insights has been enabled.
Starting to collect Insights data for rhel75_tower.localdomain
Uploading Insights data.
Successfully uploaded report from rhel75_tower.localdomain to account xxxxxx.

Now we can go see at https://cloud.redhat.com what the status of this system is.

Red Hat Insights Console

So as you can see my system is ok I have a couple of issues that need to be remediated 2 scalability issues and 3 security issues that I can drill down to and work. Now let us install SQL server on this box and see what happens. This will be a default install as I’ve documented here. SO as soon i installed SQL Server i ran an insights-client upload to see what shows up

I now have 2 more Alerts

So i don't have a tuned profile and there might be a group or ownership issue. You can see both have a check mark which means an ansible playbook is available to remedy this for me, Yay i don't have to go and google stuff to figure out how to fix this.

I just ask it to create a playbook to remedy this download it and run. Here is an example of the playbook created to solve my mssqlserver issue

- name: Update ownership of/var/opt/mssql to mssql:mssql
hosts: "rhel75_tower.localdomain"
become: yes
tasks:
- name: Update ownership of /var/opt/mssql
file:
path: /var/opt/mssql
owner: mssql
group: mssql
recurse: yes
- name: run insights
hosts: "rhel75_tower.localdomain"
become: True
gather_facts: False
tasks:
- name: run insights
command: insights-client
changed_when: false

When i execute this it will run the fix and also execute insights to upload the new data.

[root@rhel75_tower fix]# ansible-playbook  -connection=local  ansible-sqlserver.yml
[WARNING]: provided hosts list is empty, only localhost is available. Note
that the implicit localhost does not match 'all'
PLAY [Update ownership of/var/opt/mssql to mssql:mssql] ************************
TASK [Gathering Facts] *********************************************************
ok: [localhost]
TASK [Update ownership of /var/opt/mssql] **************************************
ok: [localhost]
PLAY [run insights] ************************************************************
TASK [run insights] ************************************************************
ok: [localhost]
PLAY RECAP *********************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0

You can see i fixed the ownership issue and only have tuned profile issue for sqlserver remaining. This is a very easy way fo finding and resolving your SQL Server issues with the Power of Red Hat Insights and ansible