Monitor HCL Software Knowledgebase for changes

Created:
Author: Christoph Stoettner
Read in about 5 min · 885 words

Postboxes for newsletter

Photo by Ross Findon | Unsplash

The HCL Software knowledge base is built with ServiceNow . You can register and subscribe for channels and documents. You receive mails for new documents and changed documents you have subscribed for.

The last five years since HCL migrated to this system, I missed the option to get updates via RSS (maybe I’m old, but I still love reading countless updates in my newsreader). Mails about updated documents just tell you that a document with link is updated, but you don’t get any information of what has changed in the article.

Plenty of entries in the knowledge base are so-called defect articles, which describe a known bug, if there is a workaround and most of the time when it will be fixed. When the defect article is released, your support agent will ask you to close the case and follow or subscribe the defect article.

I’m following more than 10 defect articles and mails with the information “this doc has changed” do not help me. It’s challenging to track the changes and when there is a delay for a fix, you need to remember if the fix version was different before the change.

For some months, I have used changedetection.io , with changedetection I can track all relevant defect articles, updates on fix lists, changelogs and new documents for search terms like “8.0CR7”. I run changedetection on a Rasperry Pi 4 with docker-compose , but it’s also possible to deploy with helm on Kubernetes .

On the pi I use the following docker-compose.yml:

version: '3.2'
services:
    changedetection:
      image: ghcr.io/dgtlmoon/changedetection.io
      container_name: changedetection
      hostname: changedetection
      volumes:
        - changedetection-data:/datastore
      ports:
        - 5000:5000
      restart: unless-stopped
      environment:
          - PLAYWRIGHT_DRIVER_URL=ws://playwright-chrome:3000/?stealth=1&--disable-web-security=true
    playwright-chrome:
        hostname: playwright-chrome
        image: browserless/chrome
        restart: unless-stopped
    browser-chrome:
        hostname: browser-chrome
        image: seleniarm/standalone-chromium:latest
        volumes:
            - /dev/shm:/dev/shm
        restart: unless-stopped
volumes:
  changedetection-data:

Just run docker compose up -d and after some minutes the service is available.

Now open http://:5000 and start adding interesting URLs.

I monitor for example:

Then I have added several defect articles which were announced in one of my support cases, but aren’t published until now.

Which settings do I use within Changedetection.io?

Screenshot of main settings

  1. Check for changes all eight hours
  2. Use 5 minutes jitter between checks
  3. Get the title of the page and set it as title in Changedetection

Notification settings

You can get notification for a bunch of collaboration tools, here I made an example with mail notification and template. Or you add the rss feed to your feed reader.

Use playwright

ServiceNow is using a lot of JavaScript to render the page, so we have to use the Playwright option here.

Add the first page

I want to use the 8.0 fix list as an example now. The fix list URL is https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0102882 .

Let’s take a look at the first lines:

Fix list example

  1. last updated with days, so this changes each day
  2. each time when a new user is watching the document, the counter increases
  3. average rating of the document
  4. documents matching the content of the open document
  5. we want just the content within this border without the points 1, 2 and 3

But changedetection helps us to monitor just the content we want to have.

Add new URL

New URL settings

With browser steps and visual filter selector you can select the content you would like to monitor. With browser steps, you can add clicks or run tasks (change sorting, for example).

I use the following filters, to select the content like this:

selector

CSS/JSONPath/JQ/XPath Filters: /html/body/div/section/main/div[2]/div/sp-page-row/div/div[1]/span[1]/div/div/div/div[2]/article

Remove elements:

.published
.views
.str-rating
.title-secondary-date

So now just changes in the text of the defect / knowledge base article will trigger a notification.

Lists and Browser steps

The last weeks I got a log of notifications from the lists I follow. Like https://support.hcltechsw.com/csm?id=kb_search&spa=1&language=en&kb_category=432e1eb81b49001483cb86e9cd4bcb32 , I don’t know why, but it seemed that the sort order changed multiple times during the day. It could be a cluster issue, but I looked for a way to have always the newest documents on top.

The easiest way was using the browser steps:

sort order list

Here, you see that the triangle next to Newest shows oldest documents first (descending sort order). I couldn’t find a way to change this via cookies or URL parameters. So I built a short JavaScript.

Start the browser steps, the page loads within 10 or 15 seconds.

Then add 1. a wait for text: “Applied Filters” step, so the next step only triggers if the page loaded. Next step Execute JavaScript and add if (document.getElementsByClassName('fa-caret-down')[1].offsetParent === null) { document.querySelectorAll('[aria-label="Sorted by Newest Ascending"]')[0].click() } This clicks on Newest, when the sort order is set to descend (downwards caret hidden). So the sort order is now always Newest first.

The deployment on a Raspberry Pi monitors over 50 views and documents from ServiceNow, and I host multiple services on it. Therefore, the whole monitoring needs just a few resources and could also run next to Component Pack.

We can now check each change in the diff view, like here in the Desktop plugins document, we see the download link has changed.

Diff

Summary

This could be easier, when ServiceNow would support RSS (or HCL activates it), but now I have a reliable system to track changes in the knowledge base and documentation.

Author
Suggested Reading
Card image cap

Last week I attended FrOSCon[https://froscon.org], a yearly conference about Free and Open-Source software, organized by the computer science department of the University of Applied Sciences Bonn-Rhein-Sieg.

Created: Read in about 2 min
Aaron Burden: Fountain pen and a notebook

I use Shaarli since ages to collect links, notes and bookmarks. I worked a little bit on that collection and started to share some as public lists .

On my mobile device I bought a license for Stakali , it fits perfectly into my workflows. I often search on my mobile and share the link through Stakali to my desktop. Stakali just needs the URL and the API Key of Shaarli, but I got errors. So I analyzed the source and app with:

Created:
Last Update:
Read in about 3 min
Aaron Burden: Fountain pen and a notebook

I often get SystemOut.log files from customers or friends to help them analyzing a problem. Often it is complicated to find the right server and application which generates the real error, because most WebSphere Applications (like IBM Connections or Sametime) are installed on different Application Servers and Nodes. So you need to open multiple large files in your editor, scroll each to the needed timestamps and check the lines before for possible error messages.

Created:
Last Update:
Read in about 5 min