Monday, November 16, 2026

AI: Hallmark Meets Cybersecurity

Just to see, I gave the Gemma4:31b a little task to write a script. The prompt is :

    Please write a script for a short movie that is 5 minutes or less. Include as much humor as possible. Make the movie about Cybersecurity. Also, make it into a Hallmark-style movie.
Gemma4:31b went into thinking mode first :

Thinking...
  • Length: 5 minutes or less (approx. 5 pages of script).
  • Tone: Humorous, Hallmark-style (wholesome, cozy, clichés, romantic tension, small-town vibes, soft lighting, festive/seasonal feel).
  • Subject: Cybersecurity.
  • Hallmark Tropes: Small town, a high-powered city person returning home, a misunderstood local, a "festival" or "competition," mismatched personalities, a sudden realization of love, soft music.
  • Cybersecurity Concepts: Phishing, passwords, Multi-Factor Authentication (MFA), social engineering, firewalls, "The Cloud," updates.
  • Setting: "Maple-Syrup Springs," a quaint town where everyone knows everyone and technology is mostly used for baking calendars.
  • Protagonist: CLAIRE. A high-strung CISSP/Chief Information Security Officer from NYC. Sharp suit, espresso, stressed.
  • Love Interest: CHAD. A rugged, flannel-wearing local who runs the town's only "Internet Cafe/Hardware Store." He's a secret genius but loves "simpler times."
  • Conflict: The town's "Annual Jam Festival" website has been hacked or is insecure.
  • Scene 1: The Arrival. Claire arrives in town. Visuals: Snow, twinkling lights, a cute dog.
  • Scene 2: The Discovery. Claire sees the town's digital infrastructure (or lack thereof). The "horror" of "Password123."
  • Scene 3: The Meet-Cute. Claire meets Chad. Clashing philosophies (Corporate Security vs. Small Town Trust).
  • Scene 4: The Crisis. A phishing attack hits the Jam Festival's registration.
  • Scene 5: The Resolution. They work together to save the day using "rustic" and "high-tech" methods.
  • Scene 6: The Happy Ending. A kiss under mistletoe/snow, and a promise to implement a zero-trust architecture for the town.
  • Dialogue: Needs to be overly earnest yet absurdly technical.
  • Visuals: Use "Soft Focus" and "Warm Lighting."
  • Humor: The contrast between the cozy aesthetic and the cold reality of cyber threats.
  • Check: Is it too long? Keep dialogue snappy.
  • Check: Is it Hallmark enough? Add mentions of "the spirit of the season" and "returning to one's roots."
  • Check: Is the cybersecurity accurate enough to be funny? (e.g., using MFA as a romantic metaphor).
...done thinking.


[SCENE START]

**TITLE: LOVE, LOCKS, AND LOGINS**

**SETTING:**
The town of **OAK-HOLLOW**, a place where the air smells like cinnamon and no one has ever heard of a VPN. Everything is draped in oversized bows and twinkling fairy lights.

**CHARACTERS:**

* **CLAIRE (30s):** A high-powered Chief Information Security Officer from NYC. She wears a sharp power suit, carries a tablet like a weapon, and has a nervous twitch whenever she sees an unencrypted Wi-Fi network.
* **JACK (30s):** A rugged, flannel-wearing local who runs the “Oak-Hollow General Store & Postal Hub.” He smells like pine needles and is blissfully unaware of what a “Trojan Horse” is (unless it’s a wooden toy).
* **MAYOR MABEL (60s):** Overly enthusiastic. Wears a hat with a giant festive ribbon.

---

**INT. OAK-HOLLOW GENERAL STORE - DAY**

The store is cozy. There is a fireplace. A golden retriever sleeps by the door. Soft, acoustic guitar music plays in the background.

CLAIRE enters, looking like she just stepped out of a boardroom in Manhattan. She is scanning the room with a look of utter horror.

**CLAIRE**
(To herself)
My god. The vulnerabilities. They’re everywhere.

She spots a sign-in sheet on the counter for the “Annual Maple Syrup Gala.” It’s a physical piece of paper where people have written their full names, addresses, and birthdays.

**CLAIRE**
(Gasping)
Plain text! In the wild! This is a PII nightmare!

JACK leans over the counter, flashing a dazzling, slow-motion smile.

**JACK**
Morning, sunshine. You look like you’re fighting a ghost. I’m Jack.

**CLAIRE**
(Stiffly)
I’m Claire. I’m here for my aunt’s funeral, but more importantly, I’m wondering why your guest Wi-Fi is called “Free_Internet_No_Password_123.”

**JACK**
(Chuckling)
We like things simple in Oak-Hollow, Claire. We trust our neighbors. Why put a lock on a door when everyone has a key to each other's hearts?

**CLAIRE**
(Deadpan)
Because that’s how you get a Man-in-the-Middle attack, Jack. You’re practically inviting a script kiddie from Belarus to steal the town’s identity.

**JACK**
(Confused)
Is a “script kiddie” some kind of local folk dancer?

---

**EXT. TOWN SQUARE - LATER**

Claire is walking with MAYOR MABEL. The Mayor is beaming.

**MAYOR MABEL**
And here is our pride and joy! The Oak-Hollow Digital Registry! It’s a single tablet where citizens can sign up for the gala. It’s so modern!

Claire looks at the tablet. It is an iPad from 2012. It has a sticky note taped to the back that says: **“PASSWORD: Syrup1!”**

**CLAIRE**
(Whispering)
I can’t breathe. I actually can’t breathe.

**MAYOR MABEL**
(Oblivious)
Now, Claire, we need you to help us. Jack is the only one who knows how to turn it on, but he’s currently helping a calf be born.

---

**INT. GENERAL STORE - NIGHT**

The lighting is warm and amber. A light snow begins to fall outside. Claire is frantically typing on her laptop, while Jack watches her, leaning against a wooden beam.

**JACK**
You’re always so tense, Claire. You’re treating this town like it’s a firewall. Why not just… let the data flow?

**CLAIRE**
(Looking up, eyes wide)
Because data is the new oil, Jack! And right now, Oak-Hollow is an open oil spill! I just found out the town’s treasury is managed via a shared Google Doc with “Editor” permissions for everyone in the knitting circle!

**JACK**
(Steps closer, voice dropping an octave)
Maybe you’re so worried about the hackers that you’re forgetting to live in the moment.

The music swells. They are very close. The tension is palpable.

**CLAIRE**
(Breathless)
Is this… is this a social engineering attempt? Are you trying to phish for my emotions?

**JACK**
(Smiling)
I’m just trying to implement a multi-factor authentication of the heart, Claire.

He reaches out to touch her cheek. Just as they are about to kiss—

*BEEP. BEEP. BEEP.*

Claire’s tablet screams.

**CLAIRE**
(Screaming)
RANSOMWARE!

---

**INT. TOWN SQUARE - MOMENTS LATER**

Chaos. Mayor Mabel is holding the tablet, weeping.

**MAYOR MABEL**
The screen! It says we owe ten Bitcoin to release the recipe for the Secret Maple Glaze!

**JACK**
(Panic)
Not the glaze! That’s a family heirloom!

**CLAIRE**
(In "War Room" mode)
Stand back! I’ve got this! Jack, I need a high-speed connection and a strong cup of coffee!

**JACK**
I don’t have high-speed, but I have a very fast percolator!

**MONTAGE:**
- Claire typing furiously in slow motion.
- Jack bringing her cookies and nodding encouragingly.
- Close-ups of code scrolling across the screen (it’s actually just the recipe for gingerbread).
- Claire shouting “I’m bypassing the proxy!” while Jack cheers her on.

---

**INT. GENERAL STORE - MORNING**

The sun is rising. The town is saved.

**MAYOR MABEL**
You did it, Claire! The glaze is safe! And you’ve installed something called a “Zero Trust Architecture”?

**CLAIRE**
(Smiling softly)
Yes. It means I trust no one. Especially not you, Mabel. You still use “Guest” as your password.

**JACK**
(Walking up to Claire)
You saved the town, Claire. I guess I was wrong. Some things *do* need a lock on them.

**CLAIRE**
(Smiling)
And I guess I was wrong about this town. It’s not a vulnerability. It’s a… feature.

Jack pulls her in for a kiss. It is a classic Hallmark kiss—long, slow, and perfectly framed by a wreath of holly.

**CLAIRE**
(Pulling away)
I love you, Jack.

**JACK**
I love you too, Claire.

**CLAIRE**
Now, let’s talk about your lack of an Incident Response Plan.

**JACK**
(Sighs)
Here we go.

**FADE OUT.**

**TEXT OVERLAY:** *Happy Holidays. Remember to change your passwords every 90 days.*

[SCENE END]

Friday, October 30, 2026

Docker, Autostart, and NFS Configurations

This week, after some PHP, SSL Certificate, and TCP stack advisories came out, my docker server rebooted automatically after patching.

Nothing came back online properly.

Sure, the services all tried to start in docker, but all of them failed.  It turned out after some investigation that the NFS never got mounted up.

So, rather than running docker in that state, I first found the systemctl file by running :

    systemctl list-units --type=mount

Then, I edited the /etc/systemd/system/multi-user.target.wants/docker.service and found the After= line, and added the mount.service file found.  Saved it out, and now docker should not even start without having the NFS configuration files and web documents involved.

Tuesday, October 20, 2026

Old NVR Firmware Upgrade

I have an old LaView LV-N9508Q8E network video recorder.  I wanted better monitoring, so I tried to enable SNMP.  The firmware does not support it, and LaView is gone the way of the world, but it looks like this is a re-badged HIKVision DS-7608NXI-K1/8P.  Maybe I can upgrade the firmware to a non-LaView firmware?

The background is that LaView is non-existant any longer.  However,  

So, downloading that firmware should, in theory, allow me to drop in the latest HIKVision firmware that might enable SNMP.  It might also enable better motion detection alerting (send it through an Apache web service?).

This was a fun trip.  I tried upgrading to a HIKVISION firmware first via the web browser, and also from the command line.  This lead me to setting up a new tftp server, dropping the 3.4.112 version of firmware into the tftp root directory as "digicap.dav", and building a 1.5mm, 4-pin JST header for the serial output. A "screen /dev/DEVICENAME 115200" gave me the console.

After reading up a lot on the "upgrades", the instructions looked fairly simple.  However, once I got in there (you have to hit the control-u often and quickly while you are turning the device on, FYI), you might get launched into an upgrade script automatically. 

I didn't.  Instead, I got an "HKVS $" prompt.

    
    U-Boot 2010.06-svn17334 (Sep 15 2017 - 19:37:08)
    
    Hit ctrl+u to stop autoboot:  0
    HKVS $

Instead, I had to run a series of commands that appear very "hacky".  As in SQL database drop-table hacky, like adding a semi colon and letting the parser run another command that you couldn't otherwise get to.  For example :

    setenv ';setenv ipaddr 192.168.128.8;saveenv'
    setenv ';setenv serverip 192.168.128.6;saveenv'

These will set IP addresses, then save the environment variables for the next session (yeah, you have to save between sessions).  Essentially, the output looked like :

    U-Boot 2010.06-svn17334 (Sep 15 2017 - 19:37:08)
    
    Hit ctrl+u to stop autoboot:  0 
    HKVS $ setenv ';setenv ipaddr 192.168.128.8;saveenv'
    Saving Environment to SPI Flash...
    Warning: Erase size 0x00001000 smaller than one erase block 0x00010000
             Erasing 0x00010000 instead
    Erasing SPI flash, offset 0x00120000 size 64K ...done
    Writing to SPI flash, offset 0x00120000 size 4K ...done
    HKVS $ setenv ';setenv serverip 192.168.128.6;saveenv'
    Saving Environment to SPI Flash...
    Warning: Erase size 0x00001000 smaller than one erase block 0x00010000
             Erasing 0x00010000 instead
    Erasing SPI flash, offset 0x00120000 size 64K ...done
    Writing to SPI flash, offset 0x00120000 size 4K ...done
    HKVS $

Now, I could start the upgrade :

    setenv ';upgrade'

And (after a few minutes), I was running native HikVISION firmware!  I then upgraded to 4.30.097, and did a full factory reset (gotta clean 'er up, eh?).

After it came back online, no cameras were coming online.  Turns out, I have to do a camera reset on every one of those (which might prove a little difficult since they are all PoE).


So, after a quick factory reset... nothing.  I am losing interest here, as it still doesn't work in the browser, and in Windows, it prompted for a "plug-in".  But, it did have an option to enable ssh, and if you do that, you can shell as "root" to the device using your "admin" password.  It is a very limited shell, but allows you to run "dmesg", which will tell you exactly what is on this set of hardware :

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Linux version 3.18.20 (root@CI-Backend-Slave-65-115) (gcc version 4.9.4 20150629 (prerelease) (Hisilicon_v500_20170922) ) #2 SMP Wed Dec 14 17:22:34 CST 2022
    [    0.000000] setup for rdinit= is not allowed, disable it!
    [    0.000000] setup for load_ramdisk= is not allowed, disable it!
    [    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine model: HIKVISON K74 Platform Board
    [    0.000000] Uboot is not supported safe version:V0
    [    0.000000] Command [ipaddr] is not supported, please check cmdline.
    [    0.000000] Command [192.168.128.8] is not supported, please check cmdline.
    [    0.000000] Command [serverip] is not supported, please check cmdline.
    [    0.000000] Command [192.168.128.6] is not supported, please check cmdline.
    [    0.000000] Command [serverip] is not supported, please check cmdline.
    [    0.000000] Command [192.168.128.6] is not supported, please check cmdline.
    [    0.000000] Command [bootpart=] is not supported, please check cmdline.
    [    0.000000] HIKBASE version ##78762[kernel:74730] v2.1.0 build 2022-12-14
    [    0.000000] HIKBSP svnpath: baseline/branches/trunk-v2.3.2/hikbsp-v2@85692
    [    0.000000] request_module: runaway loop modprobe fs-proc
    [    0.000000] Ignoring unrecognised tag 0x54410001
    [    0.000000] Ignoring unrecognised tag 0x54410009
    [    0.000000] cpldinfo offset[0x100000], size[0x100].
    [    0.000000] Ignoring unrecognised tag 0x484b0002
    [    0.000000] Ignoring unrecognised tag 0x484b0004
    [    0.000000] Ignoring unrecognised tag 0x484b0005
    [    0.000000] CMEM[10]: 0x83000000+0x00020000 reserve ok!
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] On node 0 totalpages: 163840
    [    0.000000] free_area_init_node: node 0, pgdat c07eb180, node_mem_map e7af7000
    [    0.000000]   Normal zone: 1280 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 163840 pages, LIFO batch:15
    [    0.000000] PERCPU: Embedded 9 pages/cpu @e7ad9000 s6080 r8192 d22592 u36864
    [    0.000000] pcpu-alloc: s6080 r8192 d22592 u36864 alloc=9*4096
    [    0.000000] pcpu-alloc: [0] 0 [0] 1 
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 162560
    [    0.000000] Kernel command line: mem=640M console=ttyS0,115200n8 noinitrd ip=ADDR:ADDR:MULTICAST:MASK:Hik-eth:eth0:none 
    [    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Memory: 640796K/655360K available (4770K kernel code, 207K rwdata, 1468K rodata, 1632K init, 272K bss, 14564K reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
    [    0.000000]     vmalloc : 0xe8800000 - 0xff000000   ( 360 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xe8000000   ( 640 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc061fc3c   (6240 kB)
    [    0.000000]       .init : 0xc0620000 - 0xc07b8000   (1632 kB)
    [    0.000000]       .data : 0xc07b8000 - 0xc07ebe60   ( 208 kB)
    [    0.000000]        .bss : 0xc07ebe60 - 0xc083009c   ( 273 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [    0.000000] Hierarchical RCU implementation.
    [    0.000000] 	Additional per-CPU info printed with stalls.
    [    0.000000] 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
    [    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000011] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655765682ns
    [    0.000195] Console: colour dummy device 80x30
    [    0.000210] Calibrating delay loop... 2596.86 BogoMIPS (lpj=12984320)
    [    0.060049] pid_max: default: 32768 minimum: 301
    [    0.060145] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.060154] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.060644] CPU: Testing write buffer coherency: ok
    [    0.060875] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.061004] Setting up static identity map for 0x8048d698 - 0x8048d6f0
    [    0.062109] CPU1: Booted secondary processor
    [    0.120070] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [    0.120134] Brought up 2 CPUs
    [    0.120147] SMP: Total of 2 processors activated (5187.17 BogoMIPS).
    [    0.120152] CPU: All CPU(s) started in SVC mode.
    [    0.121697] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
    [    0.121974] pinctrl core: initialized pinctrl subsystem
    [    0.122136] regulator-dummy: no parameters
    [    0.123688] NET: Registered protocol family 16
    [    0.123900] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.123915] Find the board(K74).
    [    0.123921] Current board is PCB[0x80315], BOARD[0x4600]
    [    0.126853] Serial: AMBA PL011 UART driver
    [    0.126939] 12080000.uart: ttyS0 at MMIO 0x12080000 (irq = 38, base_baud = 0) is a PL011 rev2
    [    0.127107] console [ttyS0] enabled
    [    0.127280] uart-pl011 12090000.uart: aliased and non-aliased serial devices found in device tree. Serial port enumeration may be unpredictable.
    [    0.127296] 12090000.uart: ttyS1 at MMIO 0x12090000 (irq = 39, base_baud = 0) is a PL011 rev2
    [    0.127428] uart-pl011 120a0000.uart: aliased and non-aliased serial devices found in device tree. Serial port enumeration may be unpredictable.
    [    0.127442] 120a0000.uart: ttyS2 at MMIO 0x120a0000 (irq = 40, base_baud = 0) is a PL011 rev2
    [    0.161021] SCSI subsystem initialized
    [    0.161150] libata version 3.00 loaded.
    [    0.161353] usbcore: registered new interface driver usbfs
    [    0.161404] usbcore: registered new interface driver hub
    [    0.161443] usbcore: registered new device driver usb
    [    0.162097] Switched to clocksource timer00
    [    0.165750] NET: Registered protocol family 2
    [    0.166268] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.166333] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.166421] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.166473] TCP: reno registered
    [    0.166484] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [    0.166525] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [    0.166698] NET: Registered protocol family 1
    [    0.166947] RPC: Registered named UNIX socket transport module.
    [    0.166956] RPC: Registered udp transport module.
    [    0.166960] RPC: Registered tcp transport module.
    [    0.166965] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.715919] persistent_ram: uncorrectable error in header
    [    0.716011] persistent_ram: uncorrectable error in header
    [    0.716097] persistent_ram: uncorrectable error in header
    [    0.716357] console [pstore-1] enabled
    [    0.716448] pstore: Registered ramoops as persistent store backend
    [    0.716455] ramoops: attached 0x20000@0x83000000, ecc: 16/0
    [    0.716944] futex hash table entries: 512 (order: 3, 32768 bytes)
    [    0.723834] NFS: Registering the id_resolver key type
    [    0.723886] Key type id_resolver registered
    [    0.723891] Key type id_legacy registered
    [    0.723948] ntfs: driver 2.1.31 [Flags: R/W].
    [    0.724231] fuse init (API version 7.23)
    [    0.724571] yaffs: yaffs built Installing.
    [    0.724599] msgmni has been set to 1251
    [    0.725748] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
    [    0.725764] io scheduler noop registered (default)
    [    0.753427] pinctrl-single 120f0000.pinmux: 234 pins at pa fe4f0000 size 936
    [    0.757142] brd: module loaded
    [    0.757521] Loading iSCSI transport class v2.0-870.
    [    0.757893] iscsi: registered transport (tcp)
    [    0.870145] ahci 11010000.sata: SSS flag set, parallel bus scan disabled
    [    0.870175] ahci 11010000.sata: AHCI 0001.0300 32 slots 2 ports 6 Gbps 0x3 impl platform mode
    [    0.870187] ahci 11010000.sata: flags: ncq sntf stag pm led clo only pmp fbs slum part ccc sxs boh 
    [    0.871027] scsi host0: ahci_platform
    [    0.871348] scsi host1: ahci_platform
    [    0.871517] ata1: SATA max UDMA/133 mmio [mem 0x11010000-0x11010fff] port 0x100 irq 49
    [    0.871524] ata2: SATA max UDMA/133 mmio [mem 0x11010000-0x11010fff] port 0x180 irq 49
    [    0.872042] hisi-sfc hisi_spi_nor.0: w25x16/s25fl016k (2048 Kbytes)
    [    0.872194] SPI Nand ID Table Version 2.7
    [    0.873269] SPI Nand(cs 1) ID: 0x2c 0x14
    [    0.873293] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x14
    [    0.873298] nand: Micron MT29F1G01ABA
    [    0.873303] nand: 128MiB, SLC, page size: 2048
    [    0.873308] Nand(Auto): OOB:128B ECC:24bit/1k 
    [    0.873321] nand:  ECC provided by Flash Memory Controller
    [    1.050156] libphy: hisi_gemac_mii_bus: probed
    [    1.300158] libphy: hisi_gemac_mii_bus: probed
    [    1.940128] libphy: hisi_own_mii_bus: probed
    [    2.140170] hi_gmac_v200 100a0000.ethernet (unnamed net_device) (uninitialized): using random MAC address 2e:26:e5:41:5d:55
    [    2.330143] attached PHY 1 to driver Generic PHY, PHY_ID=0x600d84a2
    [    2.330473] Higmac dma_sg_phy: 0xa5140000
    [    2.330913] ETH: rgmii, phy_addr=1
    [    2.530171] hi_gmac_v200 100a1000.ethernet (unnamed net_device) (uninitialized): using random MAC address a6:c8:a3:d9:d5:8d
    [    2.610159] attached PHY 8 to driver Generic PHY, PHY_ID=0x8
    [    2.610463] Higmac dma_sg_phy: 0xa5280000
    [    2.610892] ETH: mii, phy_addr=8
    [    2.611040] PPP generic driver version 2.4.2
    [    2.611140] PPP BSD Compression module registered
    [    2.611149] PPP Deflate Compression module registered
    [    2.611167] PPP MPPE Compression module registered
    [    2.611180] NET: Registered protocol family 24
    [    2.611382] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [    2.611393] ehci-platform: EHCI generic platform driver
    [    2.611480] ehci-platform 10040000.ehci: EHCI Host Controller
    [    2.611504] ehci-platform 10040000.ehci: new USB bus registered, assigned bus number 1
    [    2.611578] ehci-platform 10040000.ehci: irq 51, io mem 0x10040000
    [    2.630171] ehci-platform 10040000.ehci: USB 2.0 started, EHCI 1.00
    [    2.630686] hub 1-0:1.0: USB hub found
    [    2.630730] hub 1-0:1.0: 2 ports detected
    [    2.631032] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [    2.631044] ohci-platform: OHCI generic platform driver
    [    2.631132] ohci-platform 10030000.ohci: Generic Platform OHCI controller
    [    2.631160] ohci-platform 10030000.ohci: new USB bus registered, assigned bus number 2
    [    2.631212] ohci-platform 10030000.ohci: irq 50, io mem 0x10030000
    [    2.694630] hub 2-0:1.0: USB hub found
    [    2.694663] hub 2-0:1.0: 2 ports detected
    [    2.695034] usbcore: registered new interface driver usb-storage
    [    2.695145] usbcore: registered new interface driver usbserial
    [    2.695183] usbcore: registered new interface driver mos7840
    [    2.695217] usbserial: USB Serial support registered for Moschip 7840/7820 USB Serial Driver
    [    2.695358] mousedev: PS/2 mouse device common for all mice
    [    2.695377] i2c /dev entries driver
    [    2.695658] hidraw: raw HID events driver (C) Jiri Kosina
    [    2.695826] usbcore: registered new interface driver usbhid
    [    2.695831] usbhid: USB HID core driver
    [    2.696004] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    2.696060] TCP: cubic registered
    [    2.696588] NET: Registered protocol family 10
    [    2.697499] sit: IPv6 over IPv4 tunneling driver
    [    2.698002] NET: Registered protocol family 17
    [    2.698063] 8021q: 802.1Q VLAN Support v1.8
    [    2.698113] Key type dns_resolver registered
    [    2.698124] Key type ceph registered
    [    2.698536] libceph: loaded (mon/osd proto 15/24)
    [    2.698620] Registering SWP/SWPB emulation handler
    [    2.698690] HIKBASERD: Loading 237KiB [2 disks] into "/home/hikbase.image"... done.
    [    2.700879] /data/jenkins/workspace/Backend-BSP-CCI/8505/opensource/kernel/linux-3.18.20/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
    [    2.702324] Freeing unused kernel memory: 1632K (c0620000 - c07b8000)
    [    2.703694] init(1) called reboot syscall, cmd: 0x0.
    [    3.170247] usb 2-2: new low-speed USB device number 2 using ohci-platform
    [    3.402261] input: DaKai 2.4G RX as /devices/soc/10030000.ohci/usb2/2-2/2-2:1.0/0003:0E8F:00A8.0001/input/input0
    [    3.402447] hid-generic 0003:0E8F:00A8.0001: input,hidraw0: USB HID v1.10 Keyboard [DaKai 2.4G RX] on usb-10030000.ohci-2/input0
    [    3.412386] input: DaKai 2.4G RX as /devices/soc/10030000.ohci/usb2/2-2/2-2:1.1/0003:0E8F:00A8.0002/input/input1
    [    3.412735] hid-generic 0003:0E8F:00A8.0002: input,hiddev0,hidraw1: USB HID v1.10 Mouse [DaKai 2.4G RX] on usb-10030000.ohci-2/input1
    [    3.578060] hik_hal: module license 'HIKLICENSE' taints kernel.
    [    3.578077] Disabling lock debugging due to kernel taint
    [    3.579406] [HKBSP]HIK-BSP version #85692[kernel:74730, hikbase:78762] v2.3.2 build 2022-12-14
    [    3.579478] [HKBSP]start parsing ARGS: 'mem=640M console=ttyS0,115200n8 noinitrd ip=ADDR:TFTPADDR:MULTICAST:MASK:Hik-eth:eth0:none '
    [    3.579491] [HKBSP]Ignoring unrecognised tag 0x54410001
    [    3.579496] [HKBSP]Ignoring unrecognised tag 0x54410009
    [    3.579502] [HKBSP]cpldinfo offset[0x100000], size[0x100].
    [    3.579509] [HKBSP]bootparam offset[0x110000], size[0x200].
    [    3.579516] [HKBSP]envinfo offset[0x120000], size[0x1000].
    [    3.579521] [HKBSP]Ignoring unrecognised tag 0x484b0005
    [    3.583783] [HKBSP]Find the platform(K74).
    [    3.584219] Creating 4 MTD partitions on "hinand":
    [    3.584234] 0x000000c00000-0x000003c00000 : "flash_sys0"
    [    3.630457] 0x000003c00000-0x000006c00000 : "flash_sys1"
    [    3.676558] 0x000006c00000-0x000007c00000 : "data_config"
    [    3.692201] 0x000007c00000-0x000008000000 : "rev"
    [    3.696832] SSC board name is DS_80315
    [    3.890329] hik_rtc hik_rtc.0: rtc core: registered hik_rtc as rtc0
    [    4.425514] random: sleep urandom read with 13 bits of entropy available
    [    5.497395] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [    5.575463] UBI: attaching mtd0 to ubi0
    [    5.700127] UBI: scanning is finished
    [    5.703994] UBI: attached mtd0 (name "flash_sys0", size 48 MiB) to ubi0
    [    5.704006] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [    5.704012] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
    [    5.704017] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
    [    5.704022] UBI: good PEBs: 384, bad PEBs: 0, corrupted PEBs: 0
    [    5.704027] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
    [    5.704034] UBI: max/mean erase counter: 7/4, WL threshold: 4096, image sequence number: 131538258
    [    5.704039] UBI: available PEBs: 0, total reserved PEBs: 384, PEBs reserved for bad PEB handling: 10
    [    5.704379] UBI: background thread "ubi_bgt0d" started, PID 208
    [    5.710744] UBIFS: background thread "ubifs_bgt0_0" started, PID 211
    [    5.723745] UBIFS: recovery needed
    [    5.763013] UBIFS: recovery completed
    [    5.763030] UBIFS: mounted UBI device 0, volume 0, name "sys0"
    [    5.763038] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
    [    5.763045] UBIFS: FS size: 45711360 bytes (43 MiB, 360 LEBs), journal size 2285568 bytes (2 MiB, 18 LEBs)
    [    5.763050] UBIFS: reserved for root: 2159060 bytes (2108 KiB)
    [    5.763059] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 30A6A621-DCD0-4036-B240-374BCE3FCD58, small LPT model
    [    5.769545] UBI: attaching mtd1 to ubi1
    [    5.894140] UBI: scanning is finished
    [    5.897971] UBI: attached mtd1 (name "flash_sys1", size 48 MiB) to ubi1
    [    5.897983] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [    5.897989] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
    [    5.897994] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
    [    5.897999] UBI: good PEBs: 384, bad PEBs: 0, corrupted PEBs: 0
    [    5.898004] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
    [    5.898011] UBI: max/mean erase counter: 11/6, WL threshold: 4096, image sequence number: 1105190896
    [    5.898016] UBI: available PEBs: 0, total reserved PEBs: 384, PEBs reserved for bad PEB handling: 10
    [    5.898340] UBI: background thread "ubi_bgt1d" started, PID 214
    [    5.904655] UBIFS: background thread "ubifs_bgt1_0" started, PID 217
    [    5.917683] UBIFS: recovery needed
    [    5.961355] UBIFS: recovery completed
    [    5.961374] UBIFS: mounted UBI device 1, volume 0, name "sys1"
    [    5.961381] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
    [    5.961388] UBIFS: FS size: 45711360 bytes (43 MiB, 360 LEBs), journal size 2285568 bytes (2 MiB, 18 LEBs)
    [    5.961394] UBIFS: reserved for root: 2159060 bytes (2108 KiB)
    [    5.961402] UBIFS: media format: w4/r0 (latest is w4/r0), UUID BC3CD3A0-B8EF-4E08-A7F6-41234BE47A75, small LPT model
    [    5.967882] UBI: attaching mtd2 to ubi2
    [    6.009894] UBI: scanning is finished
    [    6.013551] UBI: attached mtd2 (name "data_config", size 16 MiB) to ubi2
    [    6.013564] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [    6.013570] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
    [    6.013575] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
    [    6.013580] UBI: good PEBs: 128, bad PEBs: 0, corrupted PEBs: 0
    [    6.013585] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
    [    6.013592] UBI: max/mean erase counter: 13/8, WL threshold: 4096, image sequence number: 2086548976
    [    6.013597] UBI: available PEBs: 0, total reserved PEBs: 128, PEBs reserved for bad PEB handling: 10
    [    6.013924] UBI: background thread "ubi_bgt2d" started, PID 220
    [    6.020337] UBIFS: background thread "ubifs_bgt2_0" started, PID 223
    [    6.033262] UBIFS: recovery needed
    [    6.083720] UBIFS: recovery completed
    [    6.083740] UBIFS: mounted UBI device 2, volume 0, name "cfg"
    [    6.083747] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
    [    6.083754] UBIFS: FS size: 13205504 bytes (12 MiB, 104 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)
    [    6.083760] UBIFS: reserved for root: 623728 bytes (609 KiB)
    [    6.083768] UBIFS: media format: w4/r0 (latest is w4/r0), UUID FCFF6689-D905-4BFD-8A33-BC2290044107, small LPT model
    [    6.132001] [HKBSP] selftests... 
    [    6.132154] Finish!
    [    8.556393] hi_gmac_v200 100a0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    [    8.565253] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [   11.560507] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
    [   11.757855] ata1.00: ATA-9: WDC WD20PURZ-85GU6Y0, 80.00A80, max UDMA/133
    [   11.757871] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
    [   11.758462] ata1.00: configured for UDMA/133
    [   11.758784] scsi 0:0:0:0: Direct-Access     ATA      WDC WD20PURZ-85G 0A80 PQ: 0 ANSI: 5
    [   11.760287] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
    [   11.760301] sd 0:0:0:0: [sda] 4096-byte physical blocks
    [   11.762210] sd 0:0:0:0: [sda] Write Protect is off
    [   11.762227] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    [   11.762356] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    [   11.791200]  sda: unknown partition table
    [   11.792271] sd 0:0:0:0: [sda] Attached SCSI disk
    [   12.112617] ata2: SATA link down (SStatus 0 SControl 310)
    [   22.888404] Module himedia: init ok
    [   22.888417] Hisilicon Media Memory Zone Manager
    [   22.888507] hi_osal 1.0 init success!
    [   22.896292] load base.ko ... OK!
    [   22.900178] load sys.ko ...OK!
    [   22.906087] load vdec.ko ....OK!
    [   22.915707] load vdh firmware.ko OK
    [   22.919724] load jpegd.ko ....OK!
    [   22.925578] load tde.ko ...OK!
    [   22.931037] load region.ko ....OK!
    [   22.941232] load vgs.ko ...OK!
    [   22.949213] load vpss.ko ...OK!
    [   22.959877] load vou.ko OK!
    [   23.017070] load hifb.ko OK!
    [   23.024770] load hdmi.ko OK!
    [   23.029631] load rc.ko ...OK!
    [   23.038915] load venc.ko ...OK!
    [   23.042452] load chnl.ko ...OK!
    [   23.046324] load vedu.ko ...OK!
    [   23.051493] load h264e.ko ...OK!
    [   23.056613] load h265e.ko ...OK!
    [   23.061200] load jpege.ko ...OK!
    [   23.067550] load vda.ko ....OK!
    [   23.074297] load ive.ko ... OK!
    [   23.078952] Load hi_cipher.ko success.
    [   23.355131] regIdx 0x0 value 0x21 
    [... SNIP - there were a whole lot of these "regIdx" lines ...]
    [   23.512914] regIdx 0xfe value 0x10ec 
    [   23.512918] *** rt5616 driver init successful! ***
    [   23.516685] load aio.ko OK!
    [   23.521750] load ai.ko OK!
    [   23.527017] load ao.ko OK!
    [   23.532006] load aenc.ko OK!
    [   23.536248] load adec.ko OK!
    [   23.568995] vca encrypt ready!vca_encrypt_major = 246
    [   23.581186] nf_conntrack version 0.5.0 (10037 buckets, 40148 max)
    [   23.635790] iscsid (386): /proc/386/oom_adj is deprecated, please use /proc/386/oom_score_adj instead.
    [   24.243631] hdmi detect retry_times : 0
    [   24.676135] start.sh (230): drop_caches: 3
    [   25.250968] hdmi detect retry_times : 1
    [   26.261000] hdmi detect retry_times : 2
    [   27.271801] hdmi detect retry_times : 0
    [   28.283110] hdmi detect retry_times : 1
    [   29.293141] hdmi detect retry_times : 2
    [   31.444024] hdmi detect retry_times : 0
    [   32.451203] hdmi detect retry_times : 1
    [   33.461234] hdmi detect retry_times : 2
    [   34.471286] hdmi detect retry_times : 0
    [   35.483379] hdmi detect retry_times : 1
    [   36.493412] hdmi detect retry_times : 2
    [   37.533550] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   37.535794] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [   37.537468] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [   37.631420] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [   37.797439] hi_gmac_v200 100a1000.ethernet eth1: Link is Up - 100Mbps/Full - flow control off
    [   37.809626] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
    [   42.217125] [HKBSP][hik_uenv hik_uenv.0][HIKUENV]attemp to create a null passwd!!!
    [   43.222014] [HKBSP][hik_uenv hik_uenv.0][HIKUENV]uboot_env_list_update set bootargs failed -17 
    [   43.381698] hi_gmac_v200 100a0000.ethernet eth0: Link is Down
    [   45.517725] hi_gmac_v200 100a0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    [   47.233706] vca_encrypt_dbg: vca_encrypt_ioctl: CMD = 0x90
    [   47.233720] vca_encrypt_dbg: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    [   47.233725] vca_encrypt_dbg: before:chip id = 0x0 
    [   47.233731] vca_encrypt_dbg: after:chip id = 0xcc3a6b18 
    [   49.983829] sched: RT throttling activated
    [  163.556621] [HKBSP][hik_uenv hik_uenv.0][HIKUENV]uboot_env_list_update set passwd failed -17 
    [ 1259.955968] recordSysStatIn (642): drop_caches: 3
    [... SNIP - a lot of drop_caches messages ...]
    [51666.442642] recordSysStatIn (642): drop_caches: 3
    [52865.784607] warning: process `taskStartSntpCl' used the deprecated sysctl system call with 1.40.
    [52866.611454] recordSysStatIn (642): drop_caches: 3
    [58549.985638] hi_gmac_v200 100a0000.ethernet eth0: Link is Down
    [58554.239680] hi_gmac_v200 100a0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
    [58867.434429] recordSysStatIn (642): drop_caches: 3
    [... SNIP - more drop_caches messages ...]
    [79270.053948] recordSysStatIn (642): drop_caches: 3
    [80470.201847] recordSysStatIn (642): drop_caches: 3

Wow! We have a full hardware dump!  Anyway, my intent is to either enable SNMP (which this firmware version does NOT have) and/or to allow a regular browser to display the video feed without silly plug-ins.  I can use RTSP to connect to my cameras and view that, but the browser still won't show it.  However, this is the latest version of the software I can find that will actually load on this, so I might indeed be "stuck".

Thursday, October 15, 2026

Removing Basic Auth from Nagios Behind Proxy

I recently installed checkmk to compare checkmk with Nagios (both under Docker and behind a Cloudflare proxy), and found Nagios runs a lot cooler on the CPU side.  So, considering keeping Nagios, I decided I needed to tackle one problem that has been bugging me.

Every time I connect to Nagios through the service, I also get prompted for a username and password via basic authentication.

If I keep Nagios, the above issue is unacceptable.  I need to resolve it.  So, since it is already behind Cloudflare, I know the header is getting there.  That means I simply need to load the rewrite module and ensure the header gets copied into the REMOTE_USER (just in case - may not be needed), and then set the "default_user_name" in cgi.cfg.  So, I grabbed a few files :

    docker cp nagios:/opt/nagios/etc/cgi.cfg cgi.cfg
    docker exec -it nagios cat /etc/apache2/sites-available/nagios.conf

I then modified the nagios.conf file in the following way :

    --- apache-nagios.conf.orig	2026-10-15 16:22:42.366466648 -0600
    +++ apache-nagios.conf	2026-10-15 16:47:12.198454588 -0600
    @@ -7,6 +7,12 @@
     
     ScriptAlias /nagios/cgi-bin "/opt/nagios/sbin"
     
    +# the following two lines are to get the authenticated user into
    +# the REMOTE USER
    +LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
    +RewriteRule .* - [E=REMOTE_USER:%{HTTP:Cf-Access-Authenticated-User-Email}]
    +
    +
     <Directory "/opt/nagios/sbin">
     #  SSLRequireSSL
        Options ExecCGI
    @@ -16,10 +22,10 @@ ScriptAlias /nagios/cgi-bin "/opt/nagios
              Require all granted
     #        Require host 127.0.0.1
     
    -         AuthName "Nagios Access"
    -         AuthType Basic
    -         AuthUserFile /opt/nagios/etc/htpasswd.users
    -         Require valid-user
    +#         AuthName "Nagios Access"
    +#         AuthType Basic
    +#         AuthUserFile /opt/nagios/etc/htpasswd.users
    +#         Require valid-user
           </RequireAll>
        </IfVersion>
        <IfVersion < 2.3>
    @@ -29,10 +35,10 @@ ScriptAlias /nagios/cgi-bin "/opt/nagios
     #     Deny from all
     #     Allow from 127.0.0.1
     
    -      AuthName "Nagios Access"
    -      AuthType Basic
    -      AuthUserFile /opt/nagios/etc/htpasswd.users
    -      Require valid-user
    +#      AuthName "Nagios Access"
    +#      AuthType Basic
    +#      AuthUserFile /opt/nagios/etc/htpasswd.users
    +#      Require valid-user
        </IfVersion>
     </Directory>
     
    @@ -47,10 +53,10 @@ Alias /nagios "/opt/nagios/share"
              Require all granted
     #        Require host 127.0.0.1
     
    -         AuthName "Nagios Access"
    -         AuthType Basic
    -         AuthUserFile /opt/nagios/etc/htpasswd.users
    -         Require valid-user
    +#         AuthName "Nagios Access"
    +#         AuthType Basic
    +#         AuthUserFile /opt/nagios/etc/htpasswd.users
    +#         Require valid-user
           </RequireAll>
        </IfVersion>
        <IfVersion < 2.3>
    @@ -60,9 +66,9 @@ Alias /nagios "/opt/nagios/share"
     #     Deny from all
     #     Allow from 127.0.0.1
     
    -      AuthName "Nagios Access"
    -      AuthType Basic
    -      AuthUserFile /opt/nagios/etc/htpasswd.users
    -      Require valid-user
    +#      AuthName "Nagios Access"
    +#      AuthType Basic
    +#      AuthUserFile /opt/nagios/etc/htpasswd.users
    +#      Require valid-user
        </IfVersion>
    </Directory>

And, I modified the cgi.conf file in the following way :

    --- cgi.cfg.orig	2026-10-15 16:54:45.686779272 -0600
    +++ cgi.cfg	2026-10-15 16:52:28.798266410 -0600
    @@ -105,6 +105,7 @@ use_ssl_authentication=0
     # server will inherit all rights you assign to this user!
      
     #default_user_name=guest
    +default_user_name=nagiosadmin
     
     
    

Now, stop your container, then delete it, and re-run adding two new parameters to map those files into place.

And, you should no longer prompt for authentication after already authenticating. 

Trying Checkmk under Docker

Please note this up front - when I installed checkmk under Docker, I did a comparison on CPU utilization between checkmk and Nagios, and the comparison (while not apples-to-apples, simply because Nagios checks on a per-minute basis, while checkmk looks like it is grabbing a lot more with regularity) is not close.  Both containers run with 4 "CPU's", so that is a direct comparison.


It appears that the checkmk runs a lot hotter than Nagios itself.  Sure, it is a much nicer interface, and it also potentially exposes things through a livestatus API in ways that might be better (I haven't played with it), but it is still a much busier application.  Proceed with that being a known point.

NetworkChuck rolled a video about a "new" monitoring package called "Checkmk".  It was actually fairly intriguing, as it uses a web-based configuration front-end (don't need to change monitoring using the command-line with a restart).  The video : 

https://www.youtube.com/watch?v=Bjifz55TTPI

Now, some of the added stuff is that it looks like a much nicer integration with metrics, not just the CRITICAL/WARNING/OK/UNKNOWN status.  I have started using docker a LOT more lately, just because it might allow things to be portable if I have to move to new hardware, or if I want to update.  So, we'll give this one a shot.  Let's see if we can do this.

It took me a few commands to find out how the image starts and what ports to forward, because nothing about it was intuitive.  So, after starting the image without it, I found a nice little command that dumps the TCP ports of the container itself.  We can use that to figure out the port to forward using trial and error, frankly.

    [username@dockerhost ~]$ docker container inspect checkmk --format '{{json .Config.ExposedPorts}}'
    {"5000/tcp":{},"6557/tcp":{},"80/tcp":{}}
    [username@dockerhost ~]$

This told me it listens on ports 5000, 6557, and 80 (Apache's HTTPd, if I've read the documentation properly).  Unfortunately, port 80 didn't actually work like I anticipated when I forwarded that.  So, I had to delete the container, and then re-create it.  The  command to start it for me :

    [username@dockerhost ~]$ docker run --name checkmk -d -p 0.0.0.0:5000:5000 checkmk/check-mk-community
    1b54e26451cc125f2a26b1298a9cfdf9a3b3843ecd3f142dc968c17ffd54acb9
    [username@dockerhost ~]$
    

It dumps the container ID, and the -d tells it to run it in the background. I recommend you then grab the logs, because the first run dumps some information we're going to need such as the default username and password (this password is NOT consistent between images - you really need to obtain that).

    [username@dockerhost ~]$ docker logs checkmk -f
    ### CREATING SITE 'cmk'
    Adding /opt/omd/sites/cmk/tmp to /etc/fstab.
    Going to set TMPFS to off.
    Preparing tmp directory /omd/sites/cmk/tmp...Generating configuration for core (type nagios)...
    Precompiling host checks...OK
    Executing post-create script "01_create-sample-config.py"...OK
    Executing post-create script "02_message-broker-certs"...OK
    Updating core configuration...
    Adding /opt/omd/sites/cmk/tmp to /etc/fstab.
    Going to set TMPFS to off.
    Skipping Apache restart.
    Created new site cmk with version 2.5.0p15.community.
    
      The site can be started with omd start cmk.
      The default web UI is available at http://1b54e26451cc/cmk/
    
      The admin user for the web applications is cmkadmin with password: Bo06iHX7qugF
      For command line administration of the site, log in with 'omd su cmk'.
      After logging in, you can change the password for cmkadmin with 'cmk-passwd cmkadmin'.
    
    ### STARTING XINETD
     * Starting internet superserver xinetd
       ...done.
    ### STARTING SITE
    Preparing tmp directory /omd/sites/cmk/tmp...Starting agent-receiver...OK
    Starting mkeventd...OK
    Starting rrdcached...OK
    Starting redis...OK
    Starting npcd...OK
    Starting automation-helper...OK
    Starting ui-job-scheduler...OK
    Starting nagios...OK
    Starting apache...OK
    Starting crontab...OK
    ### STARTING CRON
    ### CONTAINER STARTED
    ^C[username@dockerhost ~]$

What you want is the line that starts with "The admin user for the web applications" (I highlighted it in the example I'm working through).  It tells you the username, and the password you are going to need. Get this logged into your password manager.

Now, since I added the port forwarding of 5000 to 5000, I point to my docker host on port 5000, and was then presented with the login.  Entering the credentials from above gives me the wizard to create my first host (I could create a folder - I skipped that).

Monitoring our first host 

The first host I created was my NAS, because I do want to add docker stuff, and I want to port my Nagios into this thing as well. This should let me see how the metrics differ between the two.  I saw the "Problems with 1 data source detected", and immediately panicked.

Breathe, ya big nerd. It means that the agent connection failed, and I had ensured that was NOT connected (it wasn't checked on the form).  No worries.

Well, you can go back and check the box for that checkmk agent thing, and then select the "No API integrations, no checkmk agent" option, save, and re-scan.

I scanned down the list below that big scary error message, and found that it looks like it did pick up everything via SNMP, except for the temperature.  I could add the "undecided" in that list by clicking the "Monitor undecided services".  But, I opted to keep it fairly clean, and only added CPU, fans, memory, RAID status, and the volume that runs on the RAID.  Just click the green "plus" right next to  the undecided monitor you want.

Once you have them selected, you should see a "Changes" on the right side with a yellow number.  It simply means you have to click in there when you are done and activate the pending changes.

We are now monitoring our first "host".

Getting everything into checkmk

Now, as often as I searched the Googles for "migrating from Nagios to Checkmk", they all simply talked about manually putting in the hosts - e.g., there are no real tools built for migration to make it one fell swoop.  So, since the Docker instance of Nagios has all hosts in one single file in my configuration, I found that I could simply grab the unique hostnames from custom.cfg .

    grep host_name /opt/docker/nagios/etc/objects/custom.cfg |awk '{print $2}'|sort|uniq

This gave me a quick list of hostnames to add. What makes this easy is that you can just add the agent, then point to the new host, and then have it look.  We'll do that with docker, just for the sanity.  On the left, click "Setup", followed by "Linux" under "Agents".  Then, right click on the RPM (I'm doing this with RHEL), and copy the link.

Then, on your docker host, run "wget " and paste the URL, e.g. :

    [username@dockerhost nagios]$ wget http://dockerhost:5000/cmk/check_mk/agents/check-mk-agent-2.5.0p15-1.noarch.rpm
    --2026-10-14 17:23:53--  http://docker:5000/cmk/check_mk/agents/check-mk-agent-2.5.0p15-1.noarch.rpm
    Resolving docker (docker)... 192.168.1.219
    Connecting to docker (docker)|192.168.1.219|:5000... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 5877930 (5.6M) [application/x-redhat-package-manager]
    Saving to: ‘check-mk-agent-2.5.0p15-1.noarch.rpm’
    
    check-mk-agent-2.5.0p15-1.noarch.rpm 100%[======================================================================>]   5.61M  --.-KB/s    in 0.02s   
    
    2026-10-14 17:23:53 (348 MB/s) - ‘check-mk-agent-2.5.0p15-1.noarch.rpm’ saved [5877930/5877930]
    
    [username@dockerhost nagios]$

Now install it using "sudo rpm -ivh check-mk-agent-2.5.0p15-1.noarch.rpm".  Mine gave me a bright-red error about "Failed to reload xinetd.service: Unit xinetd.service not found.", but it had no impact (utilizes systemd now, and RHEL9 has NOTHING to support xinetd, anyway).

On that setup->agents side bar again, select "Other operating systems", and find the mk_docker.py under "Plug-ins".  RIght click on it, and copy the link.  Then, wget that again on your docker host to copy the plug-in down.  Install it :

    sudo install -m 0755 mk_docker.py /usr/lib/check_mk_agent/plugins/

Also make sure the Python module is installed :

    sudo yum install python3-docker.noarch

Download the example configuration file (the same way we downloaded the agent - from the browser, get to "Setup" -> "Agents" -> "Linux", and search for "docker.cfg".  Right click on that, copy the link, then in a shell on the docker host, run "wget URL" (paste the URL in place of the URL, right?).  Copy this into the /etc/check_mk directory on your docker host.

Enter the host in the hostname field, select the "Checkmx agent" under "Monitoring agents", and then click the test-connection to the right.  It should say it was successful.  If so, click the "Save & run service discovery".

Now, re-scan or perform a service discovery. 

In Checkmk, create a new folder for your docker containers ("Setup"->"Hosts"->"Add folder").  I named my folder "Docker Containers", because I have a simple mind.  If you don't have the "IP address family" checkbox showing, expand the "more settings" on the "Network address", and check the box for "IP address family", and then set the dropdown to "No IP".  Under "Monitoring agents", check the override for the "Check mkagent / API integrations", and then select "no API integrations, no checkmk agent".  If you don't see the "piggy back" option, hit the more on the right again.  Under piggy back, select it, then choose the "Always use and expect piggy back data", and hit save.

Let's get a list of container names now.  In a shell on the docker host, run a command to show them all.

    [username@dockerhost ~]$ docker ps --format '{{.Names}}'
    checkmk
    httpd
    nagios
    grafana
    cloudflare
    mqtt
    mysql-container
    [username@dockerhost ~]$

Copy the names of your hosts.

The next step is to click back into "Setup"->"Hosts", and then into the "Docker Containers" folder.  From there, click the "Hosts" at the top, followed by the "Import hosts via CSV file".

Paste the list of hosts into your contents box, and then throw a "hostname" at the top of the list (it needs a header row), click the "Perform automatic service discovery" box, then click "Upload".

Next, make sure the CSV has recognized the "host name" column, then click on the "Import" button that shows up.  Note, this screen shot has an ugly error message because I missed the hostname assignment field due to me not knowing that it needed a header row.  I only noticed when I realized I was missing a container name.

Click the "Start" button, then wait for it to finish, and then do the usual "Changes"->"Activate pending changes" step.

Give it time, and it should load all the information on your docker containers.

The Lazy Way - Scanning The Network

By this point, my second-grader attention span has waned, and I'm just "done".  So, I went into the "hosts" from under "setup", and added a folder, and enabled a network scan for my non-Internet-routeable setup.  I did specify the IP range for that network, and then I went all "Frozen" on it and "just let it go".  Eventually pulled everything up.

Setting This Up To Use A Proxied Authentication

Now for my big frustration with Nagios in docker - I would have had to really hack to get REMOTE_USER in as the user you are in for it.  It continually asked for authentication via Basic-Auth, even after performing the Cloudflare authentication.  I REALLY wanted to keep it tied to who you actually authenticated with (auditing).  Here's how.

Log in to your Checkmk instance.  Go into the Users, and add a user in the format your proxy provides (e.g. e-mail address).

Then, under "Setup", under "General", should be a "global settings". Expand "User interface", and locate the "Authenticate users by incoming HTTP requests".

Next, check the box for "Activate HTTP header authentication", and in the "HTTP request header variable" field that pops up, enter the header name used by your access manager/proxy.

If you have Cloudflare in front of it, you would use "Cf-Access-Authenticated-User-Email" for the header.  Save that.

Now you can do into the Cloudflare portal and create a new hostname/mapping, and you have access through your portal.

Wednesday, September 23, 2026

Gassed Up, and Ready to Rock

The tasks of the day started small, and ended up with a few big to-do's.

I took a few days off of work to work on the car.  First, I noted that the cooling fans (dual electric) are probably not done right.  So, I ordered a few parts to re-wire, plus to get a good switch to turn them on and off properly.

Next, I brought my neighbor over to help me get the timing set on the car.  Before, while talking with him, he kept saying "fuel, not timing".  But, since I had it somewhat running before, and only messing with the timing until I couldn't keep it running, it really had to be the timing. Right?

Really, right?

No. We worked on the car for a few days, checking plugs (one wire burnt), etc.

It very nearly ran a few times.  I spent hours using a syringe to squirt fuel into the carburetor fuel bays to fill it up to the sight holes.  The poor guy spent two days with me, and regularly said "fuel problem."

So, after getting tired of squirting gasoline into the fuel bays on the carburetor, and he again asked how the fuel pump was and if I verified that, I decided to look at the fuel filter (one of those fancy glass ones so that I can see how clogged it was getting.

Bone dry.  Sometimes, guys just don't listen, do they?  Okay, the pump is bad.  I looked at the Edlebrock fuel pumps, but opted for a Facet (I hear better things about Facet than I do Edlebrock regarding this style of fuel pump).  On Napa, it's a BK 610-1050 .

  • 32 gallons per hour
  • 4 to 7 PSI (perfect for a carburetor)
  • inline, and not in-tank, because I'm not dropping a fuel tank to hack together an in-tank and a fuel sending unit
  • While it is intended to push, this one can be set up close to the tank, inside the frame, and pull a little bit of fuel 

We'll see how this one performs over time, if it is sufficient. I already have a fuel pressure regulator, just in case, in position.

Knowing I need to get the fans into a better wiring position, and knowing I needed some electrical for the pump, I suddenly went into to-do mode for this, since I have worries. 

Here's the to-do's :

Better wire looms to prevent burnt wires.

I really need to get them past the headers, and the #2 cylinder is really bad on the angle.  If I run the wires between #2 and #4, it will burn, so I have to run the #2 wire over and around the exhaust pipe.  While here, I will actually use some of those heat covers, to see if that also helps.

Build a wiring harness for the electric fuel pump

I mapped out the wiring diagram, looking for a good spot to tap into for both the electric fuel pump as well as the cooling fans.  The best I could find on this car is the wire that feeds the HEI distributor, because if the car is running, those other two need to also be running (or be able to in the case of the fans).  There are two wires from the front of an HEI distributor, a brown one that routes to the tachometer inside the car, and a pink one that routes to the ignition switch.

So, I ordered some much-larger wire in "pink" so I can match, and then mapped out two and a half wiring harnesses.  (The half is because I'm planning ahead on the cooling fans).  First, arrange the components of the harnesses (including relays).

Then, cut wires to length and solder them together.

The wires were each done in a specific order so that I could also slide heat-shrink tubing on and seal them up.

Once each wire was soldered into place and sealed up, I commenced wrapping with a wiring harness fabric tape.

Now, I do have a "wiring harness".  It can't do much until I connect all of the relays.  Again, laid out with relays "in position".

The Painless wiring harness (50102) I used has a ground wire that is short.  But, since this body is fiberglass, there's not a whole lot I can do, because fiberglass does not conduct as well as we all hope.  So, a few relay housing wires get swapped so I can run a longer black wire along with the yellow one for the pump.  I ordered the inserts that can be put into the relay housings, and crimped them into position.  I then soldered the connectors because I have this odd fear of corrosion getting too far in, and also getting shaken loose.  So, soldering.


One issue is that each relay housing has two different types of connectors inside, so I had two different connectors.  The connectors were the 6.3mm (they are really 1/4" connectors, but the invasion of the oriental supply chains force measurement in metric).  Now, one of them I ordered had tabs on the back that were too long.

Rather than ordering new ones (and hoping I could find perfect ones because no one lists the actual data on the tab length), I just grabbed the dremel and chopped it off a little shorter.  Then, replace the wires (I'm using uniform colors, so someone using a wiring diagram for this car will know exactly what it is).

Granted, at this point, a basic relay and relay housing would have been cheaper than a Painless harness, but I was already there, and I didn't want to order and wait again.

Next, I added connectors on the ends for things like the fans as well as the fuel pump itself, and also the pink ignition wire running to the distributor, and next I tackled getting it installed.

I cut the pink ignition wire to the distributor, and installed a connector on both ends of this, then clipped everything into place.  It took a while to get it routed where it needed to be, to get the fans hooked up, and to get the wires to the fuel pump installed.

Harness is looking good! 

Electric Fuel Pump

Next, it was time to get the pump installed.  I did remove the old mechanical pump, and installed a pump block off plate.


Now, knowing I have to install better lines, I converted two of the socket head bolts for the block off plate into "studs" by using stainless all-thread and machining a round-but-hex stand off.

I can use these now as mount points for a lower bracket securing the fuel lines to the block.

I wanted to place the pump along the frame rail, however, I had only 8" of length to place it and it would have hung under the frame about a half inch.  This was unacceptable to me.  So, switching things up, it has to go into the tank.  That means, I have to get to the fuel sending unit, and install an in-tank pump if I go electrical.  Since I'm also doing this with the future to install fuel injection, it also means I need a fuel pressure regulator that will adjust low enough for the carburetor, but will also have a high enough pressure for when this gets injection.  Now, Tanks, Inc sells full tanks ready to go for the C3 Corvette, but surprisingly, this does not list a late model C3.  Holley sells a fuel pump sending unit that is a direct replacement, and that may be an easier way to go.  But, I don't want to spend $500 when I can use the pricier form fuel pump for $60 and some brass fittings.

So, drop the tank.  Swear a little because the bolts holding the tank straps in place are spinning freely and the bolts won't come loose, so run to Harbor Freight and grab some curved wrenches, then take them to the bandsaw and chop them so I can get them into the area I needed to lock the bolts.

Okay.  Let's try again to get the tank out.  Woohoo!



While there, I noticed that the sending unit did NOT have a gasket.  This is likely because the fuel tank originally had a bladder inside that also clipped over the edge.  Without it, I have to create one.  I spent time trying to figure out how to photograph and use a laser cutter, only to realize I could be done before I even finish preparing images.  So, a 12"x12" piece of fuel-safe rubber and a compass with numbers was implemented.


I then used a few of the wood clamps to put it into place on the sending unit, and then traced the holes using a silver-colored sharpie (because it shows up best on black).


Drilled and re-aligned to the sending unit, it will be perfect.. 

Now I can get back to modifying the sending unit.

I ordered some tube to create a bracket, however, I realized I can easily pull the sock off the tube, and add compression fittings to simply hook a pump up.  Granted, I did have to turn off the hex on a 3/8" hard-line to turn it into an adapter.

Then the compression adapter mated up and allowed the pump to be connected.  I drilled two holes for the wiring for the pump, and installed it.



I simply needed to finish the wiring to connect the engine bay relay to the fuel pump and install the tank, and connect the tank up to the fuel lines into the engine bay.



Yeah, I built an "adapter" (really, it's a restrictor) to force return lines and feed lines through the same diameter.

With that installed and fuel return and fuel pressure regulators and filters were all installed, it was time to get back to timing this thing. 

Cooling fans

On the wiring harness war front, I had one issue that was critical, but at the same time, not critical - mounting.

The double-relay assembly needs to be mounted securely so that it doesn't bounce into the fans or onto the exhaust and get fried.  This means potentially designing a part that fits on a non-uniform, curved surface.

I loaded up the Skanect tool, grabbed the XBox Kinect and the USB adapter, and ran a quick scan on the engine compartment.

Exporting to a PLY file (a triangle mesh), I could get a basic 3D model of the fender I need to fit this to.

First step was getting the orientation proper.  I created a cube that allowed me to adjust for size.  I shrunk the cube to fit in a specific spot, then found my scale options (I have to increase this 888.15789473% once I have it defined properly).

I tinkered with the cube until I got it the right size (I'll re-scale it once I have it proportionally good).  Then, I added tabs to create a basic bracket (no thread holes yet because I don't know the angles quite yet for perpendicularity to the inside surface).

The next step on this was to convert the mesh object to a solid.  Knowing how many faces, it is exactly why I avoided re-sizing the scan and instead re-sizing the bracket both before and after).  This took about 8 hours to process.

Then, it was simply a matter of a boolean operation to cut the scan from the "bracket".  Again, because of how many faces are involved, this took a long time.  Be patient. 

Clicking the mesh object in the tree while in "Part" view, and then clicking "Part" and "Convert to Solid".  I used a 0.100 tolerance for sewing the shape.  Note that this will take a lot of processing power, so be very patient.  If it works, you can move on.

Then, it was simply a matter of a boolean operation to cut the scan from the "bracket", or so I thought.  Again, because of how many faces are involved, this was taking a long time, so I exercised patience... until FreeCAD aborted.

[sigh].  A different approach?

Nope, after taking a different approach, FreeCAD kept aborting on me.  Apparently, there were too many faces in that scan that I was using for a reference.

So I gave up and bolted the relays directly to the fender.  I'd already installed dual fans, and new wiring, so it was a matter of putting the right connectors on the fans, and hooking them up.

Now, that gives me a good connection, and I trust the cooling system now.

Fix the starter solenoid wire (the purple one hanging down).

While working on the timing, I noted the solenoid wire from the key switch was hanging down at the starter.  This was fine, since putting the car in drive enabled the other wires and I was using a remote switch (I'm not climbing in and out of the car that many times while troubleshooting). So, I patched that one up.

Testing

Now I can finally get back to trying to time this thing.