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

geneos start overrides a netprobe instance's collection-agent.yml #64

Open
rcanillas-itrs opened this issue Jan 17, 2023 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@rcanillas-itrs
Copy link

I am trying to deploy a statsd plugin for the Collection Agent. The netprobe is run through the geneos start command. If I follow the docs and add the statsd plugin configuration to /path/to/netprobe/instance/collection-agent.yml, starting the netprobe overrides the file back to the default state.

Here is the .yml file:

[geneosuser@cen7gen01 np-6.1.1-cordial]$ cat collection-agent.yml

plugin-directory: ${env:CA_PLUGIN_DIR}

monitoring:
  reporting-interval: 10000
  health-probe:
    enabled: true
    listen-port: ${env:HEALTH_CHECK_PORT}
  self-metrics:
    enabled: true
    dimensions:
      app: collection-agent


reporters:
  - type: tcp
    name: tcp
    hostname: localhost
    port: ${env:TCP_REPORTER_PORT}

workflow:
  store-directory: .
  metrics:
    reporter: tcp
    processors:
    - type: plugin
      name: geneos-workflow
      class-name: GeneosProcessor
  attributes:
    reporter: tcp
  events:
    reporter: tcp
  logs:
    reporter: tcp
  traces:
    enabled: false


#### statsd plugin for collection agent
# From https://docs.itrsgroup.com/docs/geneos/6.1.0/data-collection/statsd.htm#Configure_Geneos_to_deploy_StatsD

collectors:
  - name: statsd
    type: plugin
    class-name: StatsdServer

    # Transport protocol.  Can be udp (default) or tcp.
    transport-protocol: udp

    # Number of milliseconds between reporting intervals.  All metrics are aggregated and windowed per interval.
    # Defaults to 10 seconds.
    reporting-interval: 10000

    # Listen port.  Defaults to 8125.
    listen-port: 8125

    # Size (in bytes) of the listening socket's receive buffer.  If configured, an attempt will be made to re-size the
    # buffer, but it is not guaranteed to take the configured size.
    # Defaults to 5MB.
    receive-buffer-size: 5242880

    # Maximum supported message size (in bytes).  Messages over this size are dropped.
    # Should be configured in correlation with the statsd client max message size.
    # Defaults to 1432 for UDP and 4096 for TCP.
    max-message-size: 1432

    # Number of milliseconds after which a metric will be purged if no updates have been received.
    # Defaults to 24 hours.
    stale-metrics-threshold: 86400000


    # Optional settings for metric derived from collected metrics.
    derived-metrics:
      timers:
       # Defaults to false.
        enabled: false

        # Optional custom percentiles to publish. Default values shown.
        percentiles:
          - 99
          - 95
          - 90
          - 75
          - 50

I start all my instances (netprobe marked by ***):

[geneosuser@cen7gen01 np-6.1.1-cordial]$ geneos start
gateway "gw-6.1.1-cordial" started with PID 5439
licd "licd-6.1.0-cordial" started with PID 5440
netprobe "np-6.1.1-cordial" started with PID 5441               ***
webserver "ws-6.1.1-cordial" started with PID 5442

Double-check that netprobe is running:

[geneosuser@cen7gen01 np-6.1.1-cordial]$ geneos ps np-6.1.1-cordial
Type      Name              Host       PID   Ports        User        Group       Starttime                  Version            Home
netprobe  np-6.1.1-cordial  localhost  5441  [7036 9137]  geneosuser  geneosuser  2023-01-17T16:10:52+08:00  active_prod:6.1.1  /home/geneosuser/geneos/netprobe/netprobes/np-6.1.1-cordial

Double-check the collection-agent.yml:

[geneosuser@cen7gen01 np-6.1.1-cordial]$ cat collection-agent.yml

plugin-directory: ${env:CA_PLUGIN_DIR}

monitoring:
  reporting-interval: 10000
  health-probe:
    enabled: true
    listen-port: ${env:HEALTH_CHECK_PORT}
  self-metrics:
    enabled: true
    dimensions:
      app: collection-agent


reporters:
  - type: tcp
    name: tcp
    hostname: localhost
    port: ${env:TCP_REPORTER_PORT}

workflow:
  store-directory: .
  metrics:
    reporter: tcp
    processors:
    - type: plugin
      name: geneos-workflow
      class-name: GeneosProcessor
  attributes:
    reporter: tcp
  events:
    reporter: tcp
  logs:
    reporter: tcp
  traces:
    enabled: false

I am unsure if I am configuring the statsd plugin on the wrong configuration file, or if geneos start rewrites the instance's collection-agent.yml file every time.

@rcanillas-itrs
Copy link
Author

rcanillas-itrs commented Jan 17, 2023

I should probably add the version:

[geneosuser@cen7gen01 plugins]$ geneos --version
geneos version v1.4.2

@pgalbavy-itrs
Copy link
Collaborator

Thanks for the report. Collection Agent is not supported yet as it was only with the release of GA6.x that it could be run in a "read only" package location. It's on the TODO list and I will use the report you have provided to ensure it works the way you would want.

It's most likely going to be February before I have time to do much as I am travelling and then on holiday next week :-)

@pgalbavy-itrs pgalbavy-itrs added the enhancement New feature or request label Jan 17, 2023
@pgalbavy-itrs
Copy link
Collaborator

Some progress has been made and I should be able to commit changes soon, after some more testing. There is a new ca3 component based n the netprobe install (like san is based on the same) but at the moment there is no support planned for collection agent to be "unmanaged" under an existing netprobe instance.

@pgalbavy-itrs
Copy link
Collaborator

There is now a ca3 component type for unmanaged collection agents.

In terms of managed agents and Netprobe overwrites - that is a Netprobe issue, I guess it's down to if you are using the built-in or custom YAML settings. Needs more investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants