Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rechecked/rcagent
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.3
Choose a base ref
...
head repository: rechecked/rcagent
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 11 commits
  • 65 files changed
  • 2 contributors

Commits on May 4, 2023

  1. Copy the full SHA
    1e94db1 View commit details

Commits on May 6, 2023

  1. Copy the full SHA
    1e67d5d View commit details

Commits on Jun 25, 2023

  1. Add documentation (#19)

    * Update docs for initial version
    
    * Update docs with new files
    
    * Update most documentation sections. Add info to readme.
    
    * Add new docs.
    
    * Finalize the docs for release
    
    * Fix issue with the plugins not being able to run as passive checks
    
    * Update version for release
    
    * Update with how to build the docs
    
    * Fix typo
    jomann09 authored Jun 25, 2023
    Copy the full SHA
    80e89f1 View commit details
  2. Update docs location

    jomann09 committed Jun 25, 2023
    Copy the full SHA
    4717a1d View commit details

Commits on Feb 13, 2024

  1. Manager integration and bug fixes for 1.10 (#21)

    * Initial code for manager integration
    
    * Changes for registering
    
    * Update info sent during registration
    
    * Add site to gitignore
    
    * Update host info for register/checkin
    
    * Make changes for cert requests
    
    * Update certificate pulling
    
    * Add code for checkin update
    
    * Update manager integration. Add more testing.
    
    * Update workflows
    
    * Remove testing info in config file
    
    * Update gitignore only allow forced config updates
    
    * Remove config from gitignore
    
    * Update development deployment
    
    * Make deploy wait for all other jobs
    
    * Update to rename files properly
    
    * Add run id properly
    
    * Move artifacts to upload
    
    * Update location for download assets
    
    * Update to make configs and downloads work properly
    
    * Fix dev build for debian 12
    
    * Update to fix using manager api url
    
    * Update for activation required and ensure disks available
    
    * Update modules
    
    * Build with go.mod golang version
    
    * Remove toolchain definition
    
    * Fix el8 and el9 builds
    
    * Try fixing centos versions another way
    
    * Revert back to regular install for centos
    
    * Fix some nil pointer reference errors
    
    * Fix upgrading issues due to preun section and fix install
    
    * Update mkdir to add parents
    
    * Fix uninstall exit error (don't worry if it's already uninstalled)
    
    * Fix install not running properly
    
    * Minor fixes for permissions and cert checks
    
    * Fix for ubuntu systems
    
    * Try fixing deb with change to if statement
    
    * Update spec for debian
    
    * one more ubuntu fix
    
    * Update certs to overwrite properly and have a proper serial
    
    * Update perms on secrets file and checkin timing
    
    * Update changelog
    Update test workflow
    Add some tests
    Fix some issues with plugin args
    
    * Update some logging output
    
    * Update local hostname variable to $LOCAL_HOSTNAME in docs/config examples
    
    * Update versioning to strip newlines and spaces
    
    * Update to fix logging
    Add waiting for register/limit reached states
    
    * Update for a server setup to happen before initial server or sender runs
    
    * Minor changes for $HOST_ADDRESS and update for release
    
    * Update default manager url in docs
    
    * Update develop workflow
    
    * One more change for workflow on develop (not on prs)
    jomann09 authored Feb 13, 2024
    Copy the full SHA
    25715d2 View commit details
  2. Fix main workflow for deb 12 (#22)

    jomann09 authored Feb 13, 2024
    Copy the full SHA
    26c9294 View commit details
  3. Fix readme links

    jomann09 committed Feb 13, 2024
    Copy the full SHA
    63ac51b View commit details
  4. Copy the full SHA
    3228bb5 View commit details
  5. Add config to git ignore

    jomann09 committed Feb 13, 2024
    Copy the full SHA
    82437b4 View commit details

Commits on Feb 15, 2024

  1. Update to fix manager empty secrets bug

    jomann09 committed Feb 15, 2024
    Copy the full SHA
    d050bb6 View commit details

Commits on Feb 23, 2024

  1. Fixes issue with not reusing http client

    jomann09 committed Feb 23, 2024
    Copy the full SHA
    1079ecd View commit details
Showing with 3,954 additions and 350 deletions.
  1. +345 −0 .github/workflows/develop.yml
  2. +36 −9 .github/workflows/{go.yml → main.yml}
  3. +1 −1 .github/workflows/tag.yml
  4. +24 −0 .github/workflows/test.yml
  5. +8 −0 .gitignore
  6. +23 −0 CHANGELOG.md
  7. +8 −2 Makefile
  8. +22 −8 README.md
  9. +1 −1 VERSION
  10. +3 −3 build/package/config.yml
  11. +21 −6 build/package/rcagent.spec
  12. BIN docs/assets/favicon.ico
  13. BIN docs/assets/rechecked-white.png
  14. +104 −0 docs/checks/active-checks.md
  15. +88 −0 docs/checks/passive-checks.md
  16. +62 −0 docs/config/checks.md
  17. +32 −0 docs/config/manager.md
  18. +278 −0 docs/config/options.md
  19. +146 −0 docs/getting-started/configuration.md
  20. +157 −0 docs/getting-started/installation.md
  21. +31 −0 docs/getting-started/nagios-xi.md
  22. +35 −0 docs/index.md
  23. +66 −0 docs/status-api/cpu.md
  24. +71 −0 docs/status-api/disk.md
  25. +69 −0 docs/status-api/load.md
  26. +134 −0 docs/status-api/memory.md
  27. +114 −0 docs/status-api/network.md
  28. +99 −0 docs/status-api/plugins.md
  29. +77 −0 docs/status-api/processes.md
  30. +69 −0 docs/status-api/services.md
  31. +167 −0 docs/status-api/system.md
  32. +24 −16 go.mod
  33. +55 −27 go.sum
  34. +20 −0 internal/config/common.go
  35. +362 −28 internal/config/config.go
  36. +47 −6 internal/config/config_test.go
  37. +0 −3 internal/config/logging.go
  38. +335 −0 internal/manager/common.go
  39. +159 −0 internal/manager/config.go
  40. +118 −0 internal/manager/secure.go
  41. +71 −56 internal/sender/common.go
  42. +7 −6 internal/sender/nrdp.go
  43. +41 −20 internal/sender/nrdp_test.go
  44. +35 −15 internal/server/certificate.go
  45. +58 −26 internal/server/server.go
  46. +6 −9 internal/status/convert.go
  47. +29 −0 internal/status/convert_test.go
  48. +11 −3 internal/status/cpu.go
  49. +38 −17 internal/status/disk.go
  50. +2 −1 internal/status/load.go
  51. +30 −22 internal/status/memory.go
  52. +14 −7 internal/status/network.go
  53. +54 −20 internal/status/plugins.go
  54. +3 −3 internal/status/processes.go
  55. +1 −0 internal/status/services.go
  56. +2 −1 internal/status/services_darwin.go
  57. +2 −1 internal/status/services_unix.go
  58. +2 −1 internal/status/system.go
  59. +3 −2 internal/status/system_unix.go
  60. +3 −0 internal/status/system_windows.go
  61. +6 −2 internal/status/utils.go
  62. +2 −1 internal/status/utils_unix.go
  63. +53 −21 main.go
  64. +64 −0 mkdocs.yml
  65. +6 −6 versioninfo.json
345 changes: 345 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,345 @@

name: Go Test/Build Dev

on:
push:
branches: [ "develop" ]

env:
RELEASE: ${{ github.run_id }}

jobs:

build_ubuntu22:
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Setup Prereqs
run: apt-get update -y && apt-get install -y alien make
env:
DEBIAN_FRONTEND: noninteractive

- name: Build & Test
run: make build && make test

- name: Build Dist
run: make build-deb

- name: Rename File
run: mv build/rcagent_*.deb build/rcagent-dev.ubuntu22.amd64.deb

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: ubuntu22-build
path: build/rcagent-dev.ubuntu22.amd64.deb

build_ubuntu20:
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Setup Prereqs
run: apt-get update -y && apt-get install -y alien make
env:
DEBIAN_FRONTEND: noninteractive

- name: Build & Test
run: make build && make test

- name: Build Dist
run: make build-deb

- name: Rename File
run: mv build/rcagent_*.deb build/rcagent-dev.ubuntu20.amd64.deb

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: ubuntu20-build
path: build/rcagent-dev.ubuntu20.amd64.deb

build_ubuntu18:
runs-on: ubuntu-latest
container:
image: ubuntu:18.04
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Setup Prereqs
run: apt-get update -y && apt-get install -y alien make
env:
DEBIAN_FRONTEND: noninteractive

- name: Build & Test
run: make build && make test

- name: Build Dist
run: make build-deb

- name: Rename File
run: mv build/rcagent_*.deb build/rcagent-dev.ubuntu18.amd64.deb

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: ubuntu18-build
path: build/rcagent-dev.ubuntu18.amd64.deb

build_debian12:
runs-on: ubuntu-latest
container:
image: debian:12
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Setup Prereqs
run: apt-get update -y && apt-get install -y alien make
env:
DEBIAN_FRONTEND: noninteractive

- name: Build & Test
run: make build && make test

- name: Build Dist
run: make build-deb

- name: Rename File
run: mv build/rcagent_*.deb build/rcagent-dev.deb12.amd64.deb

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: debian12-build
path: build/rcagent-dev.deb12.amd64.deb

build_debian11:
runs-on: ubuntu-latest
container:
image: debian:11
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Setup Prereqs
run: apt-get update -y && apt-get install -y alien make
env:
DEBIAN_FRONTEND: noninteractive

- name: Build & Test
run: make build && make test

- name: Build Dist
run: make build-deb

- name: Rename File
run: mv build/rcagent_*.deb build/rcagent-dev.deb11.amd64.deb

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: debian11-build
path: build/rcagent-dev.deb11.amd64.deb

build_debian10:
runs-on: ubuntu-latest
container:
image: debian:10
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Setup Prereqs
run: apt-get update -y && apt-get install -y alien make
env:
DEBIAN_FRONTEND: noninteractive

- name: Build & Test
run: make build && make test

- name: Build Dist
run: make build-deb

- name: Rename File
run: mv build/rcagent_*.deb build/rcagent-dev.deb10.amd64.deb

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: debian10-build
path: build/rcagent-dev.deb10.amd64.deb

build_centos_el9:
runs-on: ubuntu-latest
container:
image: tgagor/centos:stream9
steps:
- uses: actions/checkout@v3

- name: Install Prereqs
run: yum install golang rpm-build systemd-rpm-macros make -y

- name: Build & Test
run: make build && make test

- name: Build Dist
run: make build-rpm

- name: Rename File
run: mv build/rcagent-*.rpm build/rcagent-dev.el9.x86_64.rpm

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: centos-build-el9
path: build/rcagent-dev.el9.x86_64.rpm

build_centos_el8:
runs-on: ubuntu-latest
container:
image: tgagor/centos:stream8
steps:
- uses: actions/checkout@v3

- name: Install Prereqs
run: yum install golang rpm-build systemd-rpm-macros make -y

- name: Build & Test
run: make build && make test

- name: Build Dist
run: make build-rpm

- name: Rename File
run: mv build/rcagent-*.rpm build/rcagent-dev.el8.x86_64.rpm

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: centos-build-el8
path: build/rcagent-dev.el8.x86_64.rpm

build_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Build & Test
run: make build && make test

- name: Build Dist
run: |
LDFLAGS="-X github.com/rechecked/rcagent/internal/config.PluginDir=/usr/local/rcagent/plugins \
-X github.com/rechecked/rcagent/internal/config.ConfigDir=/etc/rcagent" \
make build && make build-dmg
- name: Rename File
run: mv build/rcagent-*.dmg build/rcagent-dev.dmg

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: macos-build
path: build/rcagent-dev.dmg

build_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Build & Test
run: go build -v && go test -v ./...

- name: Set path for candle and light
run: echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" >> $GITHUB_PATH
shell: bash

- name: Build Dist
run: build/build_windows.bat

- name: Rename File
run: mv build/rcagent-*.msi build/rcagent-dev.msi

- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: windows-build
path: build/rcagent-dev.msi

upload_dev:
needs:
- build_ubuntu22
- build_ubuntu20
- build_ubuntu18
- build_debian12
- build_debian11
- build_debian10
- build_centos_el9
- build_centos_el8
- build_macos
- build_win
runs-on: ubuntu-latest
environment:
name: development
url: https://downloads.rechecked.io/dev/
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Move artifacts to upload
run: mkdir upload && mv artifacts/*/* upload

- name: Upload to DO spaces
uses: BetaHuhn/do-spaces-action@v2
with:
access_key: ${{ secrets.DO_SPACES_ACCESS_KEY}}
secret_key: ${{ secrets.DO_SPACES_SECRET_KEY }}
space_name: ${{ vars.DO_SPACE_NAME }}
space_region: ${{ vars.DO_SPACE_REGION }}
source: upload
out_dir: dev
Loading