Skip to content

Add a check command for NETGEAR monitoring#10753

Merged
Al2Klimov merged 2 commits intomasterfrom
feature/netgear-checkcommand
Mar 31, 2026
Merged

Add a check command for NETGEAR monitoring#10753
Al2Klimov merged 2 commits intomasterfrom
feature/netgear-checkcommand

Conversation

@DsgnrFH
Copy link
Copy Markdown
Contributor

@DsgnrFH DsgnrFH commented Mar 11, 2026

No description provided.

@DsgnrFH DsgnrFH requested a review from Al2Klimov March 11, 2026 09:17
@DsgnrFH DsgnrFH self-assigned this Mar 11, 2026
@cla-bot cla-bot bot added the cla/signed label Mar 11, 2026
Copy link
Copy Markdown
Member

@Al2Klimov Al2Klimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Make the GitHub actions green
  • Add documentation to doc/10-icinga-template-library.md
  • In a GitHub comment, give an example config file to throw into /etc/icinga2/conf.d of a default Icinga2 install – with a Service that uses your check command to prove latter works

@DsgnrFH
Copy link
Copy Markdown
Contributor Author

DsgnrFH commented Mar 11, 2026

  • Make the GitHub actions green

    • Add documentation to doc/10-icinga-template-library.md

    • In a GitHub comment, give an example config file to throw into /etc/icinga2/conf.d of a default Icinga2 install – with a Service that uses your check command to prove latter works

Create the following file:
/etc/icinga2/conf.d/netgear.conf
With the following contents:
object Host "netgear-switch" {
import "generic-host"
address = "192.168.0.239"
}

object CheckCommand "netgear" {
command = [ PluginDir + "/check_netgear" ]
arguments = {
"-base-url" = "$netgear_base_url$"
"-username" = {
value = "$netgear_username$"
required = true
}
"-password" = {
value = "$netgear_password$"
required = true
}
}
}

apply Service "netgear-status" {
import "generic-service"

check_command = "netgear"
vars.netgear_base_url = "http://192.168.0.239"
vars.netgear_username = "admin"
vars.netgear_password = "password"

assign where host.name == "netgear-switch"
}

@oxzi
Copy link
Copy Markdown
Member

oxzi commented Mar 11, 2026

@DsgnrFH: Please communicate the changes you have done to address review comments. Just add a comment in each thread to say that you have addressed it, and, if non obvious, how and where you did so.

@DsgnrFH
Copy link
Copy Markdown
Contributor Author

DsgnrFH commented Mar 11, 2026

Waiting for the checks to complete...

@DsgnrFH DsgnrFH requested a review from Al2Klimov March 12, 2026 07:37
@Al2Klimov Al2Klimov dismissed their stale review March 12, 2026 13:19

OP addressed review

@Al2Klimov Al2Klimov requested a review from oxzi March 12, 2026 13:19
Copy link
Copy Markdown
Member

@oxzi oxzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before merging, please squash all your commits.

@Al2Klimov
Copy link
Copy Markdown
Member

Actually, right to "Enable auto-merge", there's a dropdown allowing to "Squash and merge". We already did this with #9062.

@Al2Klimov Al2Klimov dismissed their stale review March 13, 2026 12:20

OP addressed review

@DsgnrFH DsgnrFH force-pushed the feature/netgear-checkcommand branch from 0dafc66 to 3df9b2f Compare March 16, 2026 16:44
@DsgnrFH
Copy link
Copy Markdown
Contributor Author

DsgnrFH commented Mar 16, 2026

Commits squashed, ready to merge or further reviews

@Al2Klimov Al2Klimov self-requested a review March 17, 2026 10:10
Copy link
Copy Markdown
Member

@Al2Klimov Al2Klimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test

object Service "netgear" {
  host_name = NodeName
  check_command = "netgear"

  vars.netgear_base_url = "http://$check_address$"
  vars.netgear_username = "admin"
  vars.netgear_password = "password"
}

works:

states: critical=1
\_  Device Info: Uptime - 0 days, 4 hrs, 9 mins, 32 secs
    \_  CPU Usage: 4.81%
    \_  RAM Usage: 32.77%
    \_  Temperature
        \_  sensor-System1: 32.0°C
        \_  sensor-MAC: 33.0°C
        \_  sensor-System2: 31.0°C
    \_  Fans
        \_  FAN-1: 5118 RPM

E.g vars.netgear_fan_critical = 9000 also works:

states: warning=1
\_  Device Info: Uptime - 0 days, 4 hrs, 12 mins, 20 secs
    \_  CPU Usage: 5.39%
    \_  RAM Usage: 32.77%
    \_  Temperature
        \_  sensor-System1: 32.0°C
        \_  sensor-MAC: 33.0°C
        \_  sensor-System2: 31.0°C
    \_  Fans
        \_  FAN-1: 5118 RPM

@Al2Klimov Al2Klimov requested review from TheSyscall and oxzi March 17, 2026 15:42
@Al2Klimov Al2Klimov removed the request for review from TheSyscall March 18, 2026 13:24
@oxzi oxzi self-requested a review March 31, 2026 11:28
Copy link
Copy Markdown
Member

@oxzi oxzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine now, thanks!

@oxzi oxzi requested a review from Al2Klimov March 31, 2026 11:36
Copy link
Copy Markdown
Member

@Al2Klimov Al2Klimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my machine.

@Al2Klimov Al2Klimov merged commit 6368887 into master Mar 31, 2026
28 checks passed
@Al2Klimov Al2Klimov deleted the feature/netgear-checkcommand branch March 31, 2026 13:15
@Al2Klimov Al2Klimov added this to the 2.16.0 milestone Mar 31, 2026
@yhabteab yhabteab mentioned this pull request Apr 1, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants