Red Hat Insights - system(s) not checking in
Red Hat Insights is a very useful tool, it gave me two suggestions to improve RHEL system performance. Unfortunately there was one issue, it only worked on the day on which I registered the system. On the next days I received the message that the system is not checking in. I had to unregister and re-register the system every time when I wanted to get updated information ... I asked the Red Hat Insights team for assistance and they immediately responded with instructions and suggestions how to solve the problem. Thanks to everybody being involved, especially to Chris Henderson, who figured out the root cause and presented the final solution. I think it might be a good idea to share the relevant information, for those who experience a similar problem with Insights.
It turned out that everything was related to the /etc/redhat-access-insights/redhat-access-insights.cron file, which didn't have any content at all. redhat-access-insights which came pre-installed with the system installation was the culprit. After uninstalling and re-installing this package, Red Hat Insights just works as expected, now the operating system gets checked for issues and information is updated regularly every day by the running cron job. yum remove redhat-access-insights removed abrt, anaconda and initial-setup packages as dependencies, so abrt had to be re-installed too.
Responses
Thanks for the post Christian. From my testing, the "initial-setup" rpm has a lot of dependencies, and it was dependent upon a package that was dependent on the redhat-access-insights rpm. So removing the redhat-access-insights rpm ended up removing everything in that dependency chain. Luckily none of those packages is generally essential, so no harm done. Most customers don't have the "initial-setup" package installed so I don't expect this to be a common scenario.
I'm not sure why the cron script was empty. That one is the bigger puzzle. Speculation would be that it was that way in the OS image that came preinstalled on the machine. Reinstalling the Insights package installed the Insights cron script as it should.
I'm having occasional problems with /etc/redhat-access-insights/redhat-access-insights.cron but can run redhat-access-insights --register to check in without issue.
I was looking at a RHEL7 server but did notice that my RHEL6 boxes only have redhat-access-insights available. RHEL7> yum list | grep insights insights-client.noarch 3.0.3-9.el7_5 @rhel-7-server-rpms redhat-access-insights.noarch 1.0.13-2.el7 rhel-7-server-rpms
REPOS: !rhel-7-server-extras-rpms/x86_64 !rhel-7-server-optional-rpms/x86_64 !rhel-7-server-rpms/x86_64 !rhel-7-server-satellite-tools-6.3-rpms/x86_64 !rhel-7-server-supplementary-rpms/x86_64
RHEL6> yum list | grep insights redhat-access-insights.noarch 1.0.13-2.el6 @rhel-6-server-rpms
REPOS: rhel-6-server-extras-rpms rhel-6-server-optional-rpms rhel-6-server-rpms rhel-6-server-satellite-tools-6.3-rpms rhel-6-server-supplementary-rpms
Hello,
I have registered 70(different versions) systems into insights. Everyday,some or the other systems are unchecked by insights.
When I did,
ls /etc/redhat-access-insightsmachine-id redhat-access-insights.conf redhat-access-insights.cron Note: cron file font is in red color
I also tried looking the cron file,
cat /etc/redhat-access-insights/redhat-access-insights.croncat: redhat-access-insights.cron: No such file or directory
Almost every(RHEL 7.5) system has same problem.
I tried this article
Removing, installing and registering.
but could not notice any change.
- Thanking you in advance.
Hey thanks for the replies. So, now I have to just upgrade the systems from redhat-access-insights to insights-client.
yum upgrade redhat-access-insightsThe above command is enough to do all the magic. Am I right?
I have installed insights-client for 7.5, but how about other versions 7.4 and lower , Even 6.x? I think 6.4 does not have insights-client in repo. But 7.4 has the insights-client. Do you want me to go ahead and do the same for 7.4 also?
In 7.4, as there is insights-client package. I removed the redhat-access-insights and installed the insights-client. you know which commands shows both redhat-access-insights and insights-client. when I remove the redhat-access-insights keeping the insights-client, both are gone then. I am unable to understand this scenario.
Thanks for the reply,
This is the cron file in the 7.4. Is there anything wrong with this?
[root@vlmgwbp002 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.4 (Maipo)
[root@vlmgwbp002 ~]# cat /etc/redhat-access-insights/redhat-access-insights.cron
!/bin/shname=redhat-access-insights path=/usr/bin/${name}
Make sure this runs as rootif [[ $(/usr/bin/id -u) -ne 0 ]]; then echo -e "Please run as root!"; exit 1; else /bin/chmod +x ${path} if [[ $(/sbin/service cgconfig status 2>/dev/null) == Running ]]; then /bin/cgcreate -g memory:redhataccessinsights /bin/cgset -r memory.limit_in_bytes=536870912 redhataccessinsights exec /bin/cgexec -g memory:redhataccessinsights ${name} --retry 3 --quiet /bin/cgdelete memory:redhataccessinsights else exec ${name} --quiet fi fi Thanking you, Venesh.
I found two differences comparing both scripts. 1) if [[ $(/sbin/service cgconfig status 2>/dev/null) == Running ]]; ===>> if [[ $(/sbin/service cgconfig status) == Running ]];
2) exec ${name} --quiet ===>> exec ${name}
I am going to replace the old script with one you mentioned.
Thanking you, Venesh.
I have insights-client installed on RHEL6 and RHEL7 but continue to get the below messages during the cron run.
2018-06-14 03:35:07,130 DEBUG insights.client.connection Upload status: 500 Internal Server Error {"internal_error":{"reference":"62163670-6fa5-11e8-b11b-b99237dc5f1d"}} 2018-06-14 03:35:07,131 ERROR insights.client.connection Upload archive failed with status code 500 2018-06-14 03:35:07,131 ERROR insights.client.client Upload attempt 1 of 1 failed! Status Code: 500 2018-06-14 03:35:07,131 ERROR insights.client.client All attempts to upload have failed! 2018-06-14 03:35:07,131 ERROR insights.client.client Please see /var/log/insights-client/insights-client.log for additional information
I can run insights-client --register without issue.
I have written a script. If you have RHEL 7.5 and want to remove the redhat-access-insights and install the insights-client then register it to the redhat insights. You can get the script at this link.... https://raw.githubusercontent.com/venesh0709/bashscripts/master/insights-client.sh
!/bin/bashecho "$(tput setaf 2)Installation of Insights-Client!! :-) $(tput sgr 0)"
v=$(cat /etc/redhat-release)
echo $v
if [[ $v = "Red Hat Enterprise Linux Server release 7.5 (Maipo)" ]]; then echo "$(tput setaf 1)Removing the redhat-access-insights :-( $(tput sgr 0)" yum remove redhat-access-insights echo "$(tput setaf 2)Now, Installing the Insights-client.... :-) $(tput sgr 0)" yum install insights-client echo "$(tput setaf 2)Registering this machine to Redhat Insights!! $(tput sgr 0)" insights-client --register else echo "$(tput setaf 1)$(tput setab 7)This is not the RHEL 7.5 Maipo$(tput sgr 0)" fi
echo "$(tput setaf 1)Removing the insights-client.sh file in /root directory$(tput sgr 0)" rm -f /root/insights-client.sh
: ' (tput setaf 1)
1 = red 2 = green 3 = parrot green 4 = blue 5 = purple 6 = skyblue 7 = white 8 = black '
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
