FOGProject / fogproject

An open source computer cloning & management system
https://fogproject.org
GNU General Public License v3.0
1.11k stars 221 forks source link

Add kernel version reporting (dev-branch) #468

Closed wayneworkman closed 2 years ago

wayneworkman commented 2 years ago

FOG Forums thread about this PR: https://forums.fogproject.org/topic/16172/feedback-requested-adding-kernel-info-to-fog-reporting

This adds kernel version reporting to the FOG Reporting system.

Payload

Sample payload from a test system is below. Only the version information for "Linux kernel" files is returned, and nothing else.

{
    "fog_version":"1.5.9.139",
    "os_name":"Debian",
    "os_version":"11",
    "kernel_versions_info":[
        "5.15.19 (buildkite-agent@Tollana) #1 SMP Thu Feb 3 15:10:05 CST 2022",
        "5.15.19 (buildkite-agent@Tollana) #1 SMP Thu Feb 3 15:05:47 CST 2022",
        "2.6.13.1 (mdv@localhost) #1 Tue Sep 13 18:18:41 CST 2005",
        "MEMDISK 3.86 2010-04-01"
    ]
}

How I plan to incorporate the kernel info

On the FOG Reporting server side, I’ll need to add another table to the database (no big deal) with an autonumber column, datetime column, and a version varchar column of 255 length. Any version info over 255 characters would just get chopped. FOG’s kernel version info string is about 68 characters, fyi.

With those three columns, I’ll be able to count the occurrences of each unique kernel version within the last 7 days, and produce graphs much like the other graphs already being made.