A very simple agent that gives information on CPU usage, memory usage and storage
  • C# 77.7%
  • HTML 13.8%
  • Shell 7.9%
  • Batchfile 0.6%
Find a file
2026-07-11 06:40:23 +00:00
MonitoringAgent Update MonitoringAgent/MonitoringAgent.csproj 2026-07-11 06:40:23 +00:00
Scripts Fixed install script 2026-07-02 17:00:48 +02:00
.gitattributes Script 2026-06-20 16:46:28 +02:00
.gitignore WIP 2026-06-18 09:14:20 +02:00
LICENSE Add LICENSE 2026-06-19 09:41:36 +00:00
MonitoringAgent.sln Initial commit 2026-06-17 17:55:24 +02:00
publish.bat Publish AOT 2026-06-19 12:38:36 +02:00
publish.sh Fixed SystemPackageManagers Factory 2026-06-22 09:45:31 +02:00
README.md Update README.md 2026-07-02 15:00:31 +00:00

Monitoring Agent

Monitoring Agent is a very simple agent that collects information on CPU usage, memory usage and storage.
The agent exposes a HTML widget.
You can use it to display server status in Homarr

Installation

To install Monitoring Agent in your Linux server as a service:

  • Download the latest binary release for Linux

  • Unzip the archive with the command

    unzip v0.1.0-linux-x64.zip

    Configuration

    Configure your agent and widget by editing the file appsettings.json

    • Set Name and Logo

      "Name": "My server",
      "Logo": "https://mylogo.com/logo.png",
      
    • Set Username and Password

      "Auth": {
        "Username": "<Username>",
        "Password": "<Password>"
      },
      
    • Enable or disable system widgets. By default this widgets are enabled:

      "SystemWidgetsEnabled": [
        "Uptime",
        "Public IP",
        "Process count",
        "CPU",
        "Memory"
      ],
      
    • Add storage.

      Name must be equal to the path or drive to monitor (i.e. C, /mnt/Volume) .

      "Storages": [
        {
          "Name": "/",
          "Label": "Root"
        }
      ],
      
    • Add sensors. Works only on Linux.

      Sensor monitor uses the sensors command. You can check the output of the command to see which Device and Sensor you can read.

      "Sensors": [
        {
          "Device": "coretemp-isa-0000",
          "Sensor": "Package id 0",
          "Label": "Package id 0"
        }
      ],
      
    • Add hdd temperature. Works only on Linux.

      Hdd temperature monitor uses the hddtemp command

      "DisksTemperature": [
        {
          "Device": "/dev/sda",
          "Label": "sda"
        }
      ], 
      
    • Set the widget order.

      Standard names are: Uptime, Public IP, Process count, CPU and Memory.

      For storage use Storage (Name).

      For Sensors use Sensor (Name).

      For disk temperature use Disk (Device).

      To display a separator use -.

      You can check the names by opening the json endpoint with your browser.

      http://localhost:5000?username=USERNAME&password=PASSWORD

      "Widget": [
        "Uptime",
        "Public IP",
        "Process count",
        "CPU",
        "Memory",
        "-"
        "Storage (/)"
      ],
      
  • Copy the program files

    cd ./linux-x64
    sudo mkdir /opt/monitoringagent
    sudo cp -r * /opt/monitoringagent/
    sudo chmod +x /opt/monitoringagent/MonitoringAgent
    
  • Create the user to run the service

    sudo useradd -r -d /opt/monitoringagent -s /usr/sbin/nologin monitoringagent
    sudo chown -R monitoringagent:monitoringagent /opt/monitoringagent
    
  • Create the service file

    sudo tee /etc/systemd/system/monitoringagent.service > /dev/null <<EOF
    [Unit]
    Description=Monitoring Agent
    Documentation=https://git.piblog.org/sakya/MonitoringAgent
    Wants=network-online.target
    After=network-online.target
    
    [Service]
    Type=simple
    User=monitoringagent
    Group=monitoringagent
    WorkingDirectory=/opt/monitoringagent
    Environment="ASPNETCORE_ENVIRONMENT=Production"
    ExecStart=/opt/monitoringagent/MonitoringAgent
    TimeoutStopSec=5s
    LimitNOFILE=1048576
    PrivateTmp=true
    ProtectHome=true
    ProtectSystem=full
    AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
    
    [Install]
    WantedBy=multi-user.target
    EOF
    
  • Enable and start the service

    sudo systemctl daemon-reload
    sudo systemctl enable --now monitoringagent
    sudo systemctl start monitoringagent
    

Your agent should be listening on port 5000 at

Widget parameters

Parameters accepted by the widget:

  • username: mandatory.
  • password: mandatory.
  • spinnerEnabled: optional boolean value (true or false) to enable or disable the spinner when che widget is updating its data. By default the spinner is enabled.
  • headerEnabled: optional boolean value (true or false) to enable or disable the header (logo and name). By default the header is enabled.
  • refreshInterval: number of seconds between each data update. The default value is 10 seconds.

Updating

To update Monitoring Agent you can use the update.sh script.
The script downloads the zip file, updates the installed files and restart the service.