Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRPE: Allowing user to define custom shell commands #368

Merged
merged 6 commits into from
Aug 16, 2017
Merged

NRPE: Allowing user to define custom shell commands #368

merged 6 commits into from
Aug 16, 2017

Conversation

mintsoft
Copy link
Contributor

Hello,

Currently there's no way of easily extending the monitoring within PFSense, if it's not exposed by an existing check_* or via SNMP it's very difficult to be able to check from external monitoring like Nagios.

If the user has the ability to inject a shell command that gets dropped into the nrpe.conf then you can define new checks pretty easily by adding commands like /bin/tcsh -c 'grep ok /path/to/the/statefile/here && exit 0' into the GUI. It's not exactly the easiest thing for people to do, but it does at least add a seam for extension.

Feedback welcome!

Thanks,
Rob

@netgate-git-updates
Copy link

Before this pull request can be accepted you must first sign a CLA as described at https://www.pfsense.org/about-pfsense/#cla. Please read for more details.

@rbgarga rbgarga requested review from rbgarga and jim-p July 13, 2017 14:57
@mintsoft
Copy link
Contributor Author

@rbgarga @jim-p ping! Any chance of a review on this?

Copy link
Contributor

@jim-p jim-p left a comment

Choose a reason for hiding this comment

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

Looks OK, just one minor change needed that I see

$cmds[] = "command[{$cmd['name']}]={$sudo}{$nagios_check_path}/{$cmd['command']} {$wcmd} {$ccmd} {$cmd['extra']}\n";

$path_to_command = "{$nagios_check_path}/{$cmd['command']}";
$is_custom_shell_command = ($cmd['command'] === 'Custom shell command');
Copy link
Contributor

Choose a reason for hiding this comment

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

This variable is only used once, better to not set it and use the value directly if it isn't reused.

@mintsoft
Copy link
Contributor Author

Fixed @jim-p

@netgate-git-updates netgate-git-updates merged commit 98387aa into pfsense:devel Aug 16, 2017
@mintsoft mintsoft deleted the nrpe-custom-commands branch August 16, 2017 23:14
netgate-git-updates pushed a commit that referenced this pull request Jun 26, 2019
  [ Robert Edmonds ]
  * Release 1.3.2.

  * Use protobuf 3.7.1 in the Travis-CI environment (#368).

  * Fix test suite build failure on newer versions of protobuf (#369).

  [ Ilya Lipnitskiy ]
  * Fix proto3 repeated scalar field default packing behavior (#330, #377).

  [ Adam Cozzette ]
  * Fix out-of-bounds read in scan_length_prefixed_data() (#375, #376).

  [ Jurriaan Bremer ]
  * Fix -Wdeclaration-after-statement warning in parse_oneof_member() (#360).

  [ Hayri Ugur Koltuk ]
  * Fix SIGSEGV in protobuf_c_message_check() on messages with unpopulated
    oneof members (#358).

  [ Italo Guerrieri ]
  * Do not allow tag values of 0 in protobuf messages, as these are not
    allowed by proto2 or proto3 (#299).

The patch for version 1.3.1 is no longer required.

Sort Makefile statements to pacify portlint.

Reported by:	portscout
Sponsored by:	Farsight Security, Inc.
netgate-git-updates pushed a commit that referenced this pull request Mar 31, 2020
FreeBSD-relevant ChangeLog extract since 3.0.6:
   * Remove RANDFILE environment variable (#261)
   * Workaround for bug in win32 mktemp (#247, #305, PR #312)
   * Handle IP address in SAN and renewals (#317)
   * Workaround for ash and no set -o echo (#319)
   * Shore up windows testing framework (#314)
   * Provide upgrade mechanism for older versions of EasyRSA (#349)
   * Add support for KDC certificates (#322)
   * Add support for Edward Curves (#354, #350)
   * Add support for EASYRSA_PASSIN and EASYRSA_PASSOUT env vars (#368)
   * Add support for RID to SAN (#362)

Update WWW: link in pkg-descr.

Remove patches that have been integrated upstream.

Shuffle USES=-line to please portlint.

Add NO_ARCH=yes, since this is all scripts and text.

Reported by:	Eric F Crist (upstream maintainer)
netgate-git-updates pushed a commit that referenced this pull request Oct 3, 2020
* MooseFS 3.0.114-1 (2020-07-27)

  - (mount) fixed trunacting files open with O_APPEND flag (bug itntr. in 3.0.113, issue #368)
  - (cs) added disk rebalance when all designated source disks are already empty (issue #364)
  - (mount) added additional info to '.params' file (versions of mfs,libfuse itp.)
  - (master+cs) added check against EACCES after lockf (according to Linux man - such stupid error can be returned here - issue #369)
  - (master) fixed access checks in snapshot
  - (cgi+cli) removed using supervisor (only available in PRO version)
  - (cs) fixed deadlock condition on mutexes 'folderlock' and 'hashlock' (exists since 3.0.110)
  - (tools) fixed oveflow protection in number parsing function
  - (cs) fixed reporting to master duplicates with newer version
  - (cs) changed job queue policy (some tasks are not limited now)
  - (master) fixed reaction to status NOTDONE received from chunkservers
  - (master) fixed syncing and closing negative file descriptor in bgsaver
  - (mount+master) fixed handling keepcache and direct flags (related to issue #374)
  - (cgi) changed time format (issue #197)
  - (cs) added logging info when '.chunkdb' is not written to disk
  - (master) fixed alphabetical order of commands detected in changelog
  - (cs) changed queue limit to max workers (limited dynamically)
  - (cs) fixed automatic chunkserver removal in master
  - (master) added meta version increment in chunks_set_version
  - (cs) added error detection during writing '.chunkdb'
  - (all) added build id to 'what' strings
  - (nbd+cgiserv) added chdir("/")

PR:		250060
Submitted by:	MooseFS FreeBSD Team <freebsd@moosefs.pro> (maintainer)
netgate-git-updates pushed a commit that referenced this pull request Jul 5, 2022
Changes since 0.3.0:

We reached v1.0.0

- fix!: Replace limit flag with paginate by @ankitpokhrel in #359
- fix!: Append components on edit instead of overriding by @ankitpokhrel in #368
- feat!: Append label to an issue, show labels at issue list view by @stchar in #300
- refactor!: Move boards and project list to subcommand by @ankitpokhrel in #314

- feat: Support custom fields on issue create by @ankitpokhrel in #319
- feat: Add support to read from .netrc by @adolsalamanca in #329
- feat: Add support for OS keyrings/-chains by @boyvanamstel in #348
- feat: Support auth with personal access tokens by @marek-veber / @ankitpokhrel in #327
- feat: Allow to set fixVersions on issue creation by @ankitpokhrel in #276
- feat: Allow insecure TLS by @ankitpokhrel in #305
- feat: Add --no-browser option to open cmd by @ankitpokhrel in #308
- feat: Add search option for boards on jira init by @ankitpokhrel in #322
- feat: Add issues unlink command by @sushilkg in #347
- feat: Support refresh for issues list by @GZLiew in #325
- feat: Ability to delete issue by @ankitpokhrel in #336
- feat: Allow to set custom fields on epic create by @ankitpokhrel in #364
- feat: Allow to edit release-info/fixVersions by @ankitpokhrel in #365
- feat: Allow removing labels on edit by @ankitpokhrel in #371
- feat: Support creating issues with custom subtask type by @danobi in #372
- feat: Allow removing component on edit by @ankitpokhrel in #374
- feat: Allow removing fixVersions on edit by @ankitpokhrel in #376
- feat: Support custom fields on issue edit by @ankitpokhrel in #377
- feat: Jira init non-interactive by @ankitpokhrel in #381
- feat: Show subtasks in issue view by @ankitpokhrel in #382
- feat: Allow project filter in raw jql by @ankitpokhrel in #395

- fix: Makefile compatiblity with Make 3.81 by @danmichaelo in #252
- fix: Config generation issue by @ankitpokhrel in #275
- fix(cfg): Strip trailing slash on server name by @ankitpokhrel in #295
- fix: Jira client should respect timeout opt by @ankitpokhrel in #304
- fix: Respect GLAMOUR_STYLE env on issue view by @ankitpokhrel in #317
- fix: Get subtask handle from config by @ankitpokhrel in #296
- fix: Jira wiki parser by @ankitpokhrel in #326
- fix: Display correctly columns in list sprint command help by @adolsalamanca in #320
- fix: Panic on empty sub-list by @ankitpokhrel in #330
- fix: Issue with assigning user by @ankitpokhrel in #321
- fix: OOM bug on issue view by @ankitpokhrel in #350
- fix: Assign parent key as is on edit by @ankitpokhrel in #351
- fix: Add additional check for total boards returned by @ankitpokhrel in #360
- fix: Issue with query param in user assignment by @ankitpokhrel in #380
- fix: Subtask clone by @ankitpokhrel in #383
- fix: editing issue with custom field in non interactive mode by @DrudgeRajen in #391

- dep: Upgrade charmbracelet/glamour to 0.5.0 by @ankitpokhrel in #309
- dep: Upgrade rivo/tview to latest by @ankitpokhrel in #310
- dep: Upgrade outdated packages by @ankitpokhrel in #311
- dep: Upgrade cobra to 1.4.0 by @ankitpokhrel in #373

- Use md ext for tmp file to trigger vim syntax by @ElementalWarrior in #318

Full Changelog: ankitpokhrel/jira-cli@v0.3.0...v1.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants