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

Status command does not show full name of components #2829

Closed
belimawr opened this issue Jun 9, 2023 · 4 comments · Fixed by #2890
Closed

Status command does not show full name of components #2829

belimawr opened this issue Jun 9, 2023 · 4 comments · Fixed by #2890
Assignees
Labels
bug Something isn't working Team:Elastic-Agent Label for the Agent team

Comments

@belimawr
Copy link
Contributor

belimawr commented Jun 9, 2023

  • Version: 8.8.1
  • Operating System: Linux, probably affects all OSs

Description

When using the status command it is not possible to differentiate the monitoring components from the integrations one. That is specially confusing when using the filestream input because there will be two components with the same name

Steps to Reproduce:

  1. Create a Cloud 8.8.1 deployment
  2. Create a policy with: monitoring enabled, system integration and Custom Logs
  3. Download the policy and add a filestream input
      - id: filestream-policy-input-id
        name: filestream-name
        type: filestream
        use_output: default
        data_stream:
          namespace: default
        streams:
          - id: filestream-id
            data_stream:
              dataset: generic
            paths:
              - /tmp/flog.log
  4. Deploy Elastic-Agent Standalone
  5. Run the status command
    vagrant@🌐 archlinux ~/elastic-agent-8.8.1-linux-x86_64 % ./elastic-agent status 
    State: HEALTHY
    Message: Running
    Fleet State: STOPPED
    Fleet Message: Not enrolled into Fleet
    Components:
      * system/metrics  (HEALTHY)
                        Healthy: communicating with pid '15394'
      * log             (HEALTHY)
                        Healthy: communicating with pid '15405'
      * beat/metrics    (HEALTHY)
                        Healthy: communicating with pid '15416'
      * http/metrics    (HEALTHY)
                        Healthy: communicating with pid '15427'
      * filestream      (HEALTHY)
                        Healthy: communicating with pid '15437'
      * filestream      (HEALTHY)
                        Healthy: communicating with pid '15761'
    vagrant@🌐 archlinux ~/elastic-agent-8.8.1-linux-x86_64 % ./elastic-agent version
    Binary: 8.8.1 (build: 4ac18b271bb99e57720e3a78aad26a05d9451dab at 2023-06-06 02:14:16 +0000 UTC)
    Daemon: 8.8.1 (build: 4ac18b271bb99e57720e3a78aad26a05d9451dab at 2023-06-06 02:14:16 +0000 UTC)
    
  6. The JSON output correctly differentiates the components
        {
            "id": "filestream-monitoring",
            "name": "filestream",
            "state": 2,
            "message": "Healthy: communicating with pid '15437'",
            "units": [
                {
                    "unit_id": "filestream-monitoring-filestream-monitoring-agent",
                    "unit_type": 0,
                    "state": 2,
                    "message": "Healthy"
                },
                {
                    "unit_id": "filestream-monitoring",
                    "unit_type": 1,
                    "state": 2,
                    "message": "Healthy"
                }
            ],
            "version_info": {
                "name": "beat-v2-client",
                "version": "8.8.1",
                "meta": {
                    "build_time": "2023-06-05 20:27:02 +0000 UTC",
                    "commit": "7ba375a8778fe6c1a61376a6c015e8cea71caf21"
                }
            }
        },
        {
            "id": "filestream-default",
            "name": "filestream",
            "state": 2,
            "message": "Healthy: communicating with pid '15761'",
            "units": [
                {
                    "unit_id": "filestream-default-filestream-policy-input-id",
                    "unit_type": 0,
                    "state": 2,
                    "message": "Healthy"
                },
                {
                    "unit_id": "filestream-default",
                    "unit_type": 1,
                    "state": 2,
                    "message": "Healthy"
                }
            ],
            "version_info": {
                "name": "beat-v2-client",
                "version": "8.8.1",
                "meta": {
                    "build_time": "2023-06-05 20:27:02 +0000 UTC",
                    "commit": "7ba375a8778fe6c1a61376a6c015e8cea71caf21"
                }
            }
        }
@belimawr belimawr added bug Something isn't working Team:Elastic-Agent Label for the Agent team labels Jun 9, 2023
@pierrehilbert
Copy link
Contributor

pierrehilbert commented Jun 9, 2023

Should we use the id instead of the name then?
It will probably be easier to differentiate when we will have Unit in the status command #2107.

@belimawr
Copy link
Contributor Author

belimawr commented Jun 9, 2023

The ID sounds like a good option. We can also tackle this together with #2107 as long as it does not take too long to be implemented. We really need to improve our debug-ability.

@blakerouse
Copy link
Contributor

The human readable out of the status command is really bad. We really need to work on improving this output for human readability.

@cmacknz
Copy link
Member

cmacknz commented Jun 12, 2023

This seems like it should be fixed as part of #2107

leehinman added a commit to leehinman/elastic-agent that referenced this issue Jun 16, 2023
- change to list format for human output
- change human to only report top level status if all components and
  units are healthy
- change human to report full status for component if any unit or
  component itself is not healthy
- add `human_full` which always displays full status
- sort components and units so order will always be the same

Closes elastic#2107
Closes elastic#2829
@leehinman leehinman mentioned this issue Jun 16, 2023
6 tasks
leehinman added a commit to leehinman/elastic-agent that referenced this issue Jun 16, 2023
- change to list format for human output
- change human to only report top level status if all components and
  units are healthy
- change human to report full status for component if any unit or
  component itself is not healthy
- add `human_full` which always displays full status
- sort components and units so order will always be the same

Closes elastic#2107
Closes elastic#2829
leehinman added a commit to leehinman/elastic-agent that referenced this issue Jun 16, 2023
- change to list format for human output
- change human to only report top level status if all components and
  units are healthy
- change human to report full status for component if any unit or
  component itself is not healthy
- add `human_full` which always displays full status
- sort components and units so order will always be the same

Closes elastic#2107
Closes elastic#2829
leehinman added a commit that referenced this issue Jun 20, 2023
* update status command

- change to list format for human output
- change human to only report top level status if all components and
  units are healthy
- change human to report full status for component if any unit or
  component itself is not healthy
- add `full` which always displays full status
- sort components and units so order will always be the same

Closes #2107
Closes #2829

Co-authored-by: Tiago Queiroz <contato@tiago.eti.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants