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

Linux Connector not functioning properly when running the CLI locally #232

Closed
MohammedSentry opened this issue Jun 6, 2024 · 0 comments · Fixed by #247
Closed

Linux Connector not functioning properly when running the CLI locally #232

MohammedSentry opened this issue Jun 6, 2024 · 0 comments · Fixed by #247
Assignees
Labels
enhancement New feature or request

Comments

@MohammedSentry
Copy link

The Linux connector is not functioning correctly when running the CLI locally. Below is the command used and the corresponding output:

./metricshub localhost -t linux --ssh --connectors Linux -vvvv
[INFO ] [o.s.m.e.e.ExtensionLoader] Loaded protocol extension OsCommandExtension.
[INFO ] [o.s.m.e.e.ExtensionLoader] Loaded protocol extension PingExtension.
[INFO ] [o.s.m.e.e.ExtensionLoader] Loaded protocol extension SnmpV3Extension.
[INFO ] [o.s.m.e.e.ExtensionLoader] Loaded protocol extension HttpExtension.
[INFO ] [o.s.m.e.e.ExtensionLoader] Loaded protocol extension WinRmExtension.
[INFO ] [o.s.m.e.e.ExtensionLoader] Loaded protocol extension IpmiExtension.
[INFO ] [o.s.m.e.e.ExtensionLoader] Loaded protocol extension SnmpExtension.
[INFO ] [o.s.m.e.e.ExtensionLoader] Loaded protocol extension WbemExtension.
[INFO ] [o.s.m.e.e.ExtensionLoader] Loaded protocol extension WmiExtension.
[INFO ] [o.s.m.e.c.p.ConnectorLibraryParser] Yaml loading duration: 2 seconds
Performing detection on localhost using SSH...
[TRACE] [o.s.m.e.t.TelemetryManager] Hostname localhost - Engine called for thread main.
[TRACE] [o.s.m.e.t.TelemetryManager] Hostname localhost - Calling strategy DetectionStrategy.
[DEBUG] [o.s.m.e.s.d.DetectionStrategy] Hostname localhost - Start detection strategy.
[DEBUG] [o.s.m.e.s.d.AutomaticDetection] Hostname localhost - Start automatic detection.
[DEBUG] [o.s.m.e.s.d.AbstractConnectorProcessor] Hostname localhost - Detected failed criterion for connector Linux. Message: CommandLineCriterion test ran but failed:
- CommandLine: /usr/bin/uname -o || /bin/uname -o
- ExecuteLocally: false
- ExpectedResult: GNU/Linux

Actual result:
.
[DEBUG] [o.s.m.e.t.MonitorFactory] Hostname localhost - Created endpoint host ID: localhost
[INFO ] [o.s.m.e.t.TelemetryManager] Hostname localhost - End of strategy DetectionStrategy.
[DEBUG] [o.s.m.e.t.TelemetryManager] Hostname localhost - >>> DetectionStrategy >>>
{
  "total" : 1,
  "monitors" : [ {
    "metrics" : { },
    "attributes" : {
      "is_endpoint" : "true",
      "id" : "localhost",
      "name" : "localhost",
      "location" : "local"
    },
    "conditionalCollection" : { },
    "legacyTextParameters" : { },
    "alertRules" : { },
    "resource" : {
      "type" : "host",
      "attributes" : {
        "os.type" : "linux",
        "agent.host.name" : "mk-deb2.internal.sentrysoftware.net",
        "host.name" : "localhost",
        "host.type" : "compute",
        "host.id" : "localhost"
      }
    },
    "discoveryTime" : 1717668934344,
    "type" : "host",
    "id" : "localhost",
    "endpointHost" : true,
    "endpoint" : true,
    "is_endpoint" : true
  } ]
}
No connector detected. Stopping.
Please verify that your credentials are correct and that your network connection is stable and not blocking the communication. For detailed troubleshooting steps, use the -vvvv option to display more diagnostic logs.
@NassimBtk NassimBtk added the enhancement New feature or request label Jun 8, 2024
NassimBtk added a commit that referenced this issue Jun 12, 2024
* Normalized code source to make it testable.
* Updated unit tests.
@SafaeAJ SafaeAJ linked a pull request Jun 12, 2024 that will close this issue
NassimBtk added a commit that referenced this issue Jun 12, 2024
* Created variable in unit tests.
* Enabled debug mode.
NassimBtk added a commit that referenced this issue Jun 12, 2024
NassimBtk added a commit that referenced this issue Jun 12, 2024
SafaeAJ added a commit that referenced this issue Jun 12, 2024
NassimBtk added a commit that referenced this issue Jun 12, 2024
* Optimized Shell command retrieval
NassimBtk added a commit that referenced this issue Jun 12, 2024
…onnector-cli-not-functioning-locally

Issue #232: Linux Connector CLI Not Functioning Locally
@iguitton iguitton changed the title Linux Connector CLI Not Functioning Locally Linux Connector not functioning properly when running the CLI locally Jun 20, 2024
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

Successfully merging a pull request may close this issue.

3 participants