System Uptime Tracking #
The system uptime tracking feature monitors when a client system is up. It works on an hourly basis—the system is considered up if it was running at any part of the given hour. The information is stored in SUSE Customer Center (SCC) and Repository Mirroring Tool (RMT), and serves as a source for analytics purposes.
1 Requirements #
The version of the suseconnect-ng package has to be 1.13 or newer. Verify it by running
suseconnect --version.If the client system is behind RMT, the version of the rmt-server package on the RMT server has to be 2.17 or newer. Verify it by running
rpm -q rmt-server.
2 Enabling the uptime tracking #
The uptime tracking is disabled by default. To enable it on the client
system, start its systemd timer and adjust the SUSEConnect
configuration.
systemd timer #Enable and start the
suse-uptime-trackertimer.>sudosystemctl enable --now suse-uptime-tracker.timerCheck if the service is running.
>systemctl status suse-uptime-tracker.timer
(Optional) If you do not have a copy of the
/etc/SUSEConnectfile, create it by copying the example file.>sudocp /etc/SUSEConnect.example /etc/SUSEConnectEdit
/etc/SUSEConnectand enable the uptime tracking.enable_system_uptime_tracking: true
After enabling the uptime tracking, the timer checks if the system is running every 15 minutes and stores the findings in a log file
/etc/zypp/suse-uptime.log. The log file is uploaded to SCC/RMT by thesuseconnect-keepaliveservice, which is triggered by thesuseconnect-keepalivetimer every 24 hours. Verify that the timer is running.>systemctl status suseconnect-keepalive.timer
3 Viewing and downloading the data from SCC #
The SUSE Customer Center provides visualization of the uptime data for the last 14 days. The data is presented for individual systems in a histogram. You can monitor uptime trends and download CSV files with the uptime data for all owned servers and individual systems.
Uptime data graphs and download capabilities are available only for systems that have reported uptime data. For systems that have not reported any uptime data, there are no uptime tracking widgets in the section of SCC.
Log in to SCC at https://scc.suse.com with your credentials.
In the left panel, select and click the tab to view the systems in your organization that have uptime data available in the last 14 days.
To download a CSV file that contains uptime data for all the systems in your organization, select System uptimes from the drop-down list. The drop-down list is only present if system uptime data is available.
Figure 1: Download uptime data for all systems in an organization #To view the uptime data histogram for a specific host, click its name from the list. In the host's section, the 14-day histogram provides a detailed visual representation of the system uptime.
Figure 2: Uptime data histogram #To download a CSV file containing the uptime data for the selected system, click the button located above the histogram.
4 Retrieving the data from the command line #
You can retrieve the data that the uptime tracker collects from SCC and export them to the CSV format via its REST API.
Obtain your organization's mirroring credentials from the tab on the SCC Web site at https://scc.suse.com.
Get the list of all systems for your organization.
>curl -X 'GET' \ -u'USERNAME:PASSWORD' \ 'https://scc.suse.com/connect/organizations/systems' \ -H 'accept: application/json'In the list of systems, identify the client for which you want to retrieve the uptime data by matching its credentials found in the client's
/etc/zypp/credentials.d/SCCcredentialsfile.Retrieve the uptime data. The following examples retrieve uptime data for the system with ID
16300735from May 28th, 2025 to June 1st, 2025. You can use either thecurlorwgetcommand for the retrieval.To retrieve the data using the
curlcommand, run the following:>curl -X 'GET' \ -u'USERNAME:PASSWORD' \ 'https://scc.suse.com/connect/organizations/system_uptimes?system_id=16300735&online_from=2024-04-24&online_to=2024-05-01' \ -H 'accept: text/csv'To retrieve the data using the
wgetcommand, run the following:>wget --no-check-certificate \ --user=USERNAME --password=PASSWORD \ 'https://scc.suse.com/connect/organizations/system_uptimes?system_id=16300735&online_from=2024-04-24&online_to=2024-05-01' \ --header='accept: text/csv'
5 Understanding the uptime data #
The uptime data retrieved from SCC has the following structure, where columns are separated by semicolons, for example:
Id,Hostname,Online At Day,Online For Hours,Labels 16300735,localhost.localdomain,2025-05-28,20,"test" 16300735,localhost.localdomain,2025-05-29,5,"test" 16300735,localhost.localdomain,2025-05-30,8,"test" 16300735,localhost.localdomain,2025-06-01,7,"test"
If the above wget and curl commands
include the include_hourly=true option, you receive more
details about at what hours the host was up, for example:
Id,Hostname,Online At Day,Online For Hours,Online At Hours,Labels 16300735,localhost.localdomain,2025-05-28,20,000011111111111111111111,"test" 16300735,localhost.localdomain,2025-05-29,5,000000000000000000111110,"test" 16300735,localhost.localdomain,2025-05-30,8,000000000000000111111110,"test" 16300735,localhost.localdomain,2025-06-01,7,000000000000000001111111,"test"
The columns have the following meaning:
- Id
All the systems managed by SCC/RMT are uniquely identified by a system ID generated during system registration in SCC/RMT.
- Hostname
The host name of the system.
- Online At Day
The days on which the system was up at least for one hour. See the “Online At Hours” term explanation for deeper understanding.
- Online At Hours
Each bit represents the hour of the day. The leftmost position represents the zeroth hour of the day. “1” indicates that the system was up at any time during an hour, while “0” indicates that the system was offline.
- Online For Hours
Number of hours when the system was up during a given day.
- Labels
List of custom labels. It is blank if you have not applied any labels to the systems being metered.
6 Practical tasks #
- 1. Why is the uptime data not available?
On the client host, verify that the
suseconnect-keepalivetimer is running. It controls triggering thesuseconnect-keepalive.serviceservice automatically every 24 hours.
- 2. Was the host up between 9–10 a.m. on 2025-02-28?
Retrieve the uptime data as described in Section 4, “Retrieving the data from the command line”. Open the data file and search for the line that includes
2025-02-28. Inspect that day's bit pattern, for example,000011111111111111111111and count up to the 10th digit (the bit starts with 0 a.m.) from left. The corresponding bit is1, therefore the system was up between 9 and 10 a.m.
- 3. What is the total uptime and downtime of the host on 2025-05-28?
The log line related to that date shows the bit pattern
000011111111111111111111. There are twenty 1's and four 0's in the pattern meaning that the host was up for twenty hours and down for four hours.
- 4. How many hours was the host up from May 28th to June 1st?
To retrieve statistics about the host in a specific period, adjust the
online_fromandonline_toparameters in the URL query mentioned in Section 4, “Retrieving the data from the command line”, for example:>curl -X 'GET' \ -u'USERNAME:PASSWORD' \ 'https://scc.suse.com/connect/organizations/system_uptimes?include_hourly=true&system_id=16300735&online_from=2025-05-28&online_to=2025-06-01' \ -H 'accept: text/csv' Id,Hostname,Online At Day,Online For Hours,Online At Hours,Labels 16300735,localhost.localdomain,2025-05-28,20,000011111111111111111111,"test" 16300735,localhost.localdomain,2025-05-29,5,000000000000000000111110,"test" 16300735,localhost.localdomain,2025-05-30,8,000000000000000111111110,"test" 16300735,localhost.localdomain,2025-06-01,7,000000000000000001111111,"test"The sum of the
Online For Hourscolumn is 40, indicating the host was up for 3 40 hours.
- 5. How do I retrieve the uptime data for all hosts in my organization?
For that purpose, omit the
system_id,online_fromandonline_toparameters from the URL query, for example:>curl -X 'GET' \ -u'USERNAME:PASSWORD' \ 'https://scc.suse.com/connect/organizations/system_uptimes?include_hourly=true \ -H 'accept: text/csv' Id,Hostname,Online At Day,Online For Hours,Online At Hours,Labels 16300735,localhost.localdomain,2025-05-28,20,000011111111111111111111,"test" 16300736,localhost.localdomain,2025-05-29,5,000000000000000000111110,"lab" 16300736,localhost.localdomain,2025-05-30,8,000000000000000111111110,"lab" 16300737,localhost.localdomain,2025-05-30,7,000000000000000011111111,"prod" 16300737,localhost.localdomain,2025-06-01,7,000000000000000000111111,"prod"As you can see, the list includes system IDs from different hosts.