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

Add support for the UI block in task groups, tasks, and allocations #24103

Open
josegonzalez opened this issue Oct 2, 2024 · 1 comment
Open

Comments

@josegonzalez
Copy link
Contributor

josegonzalez commented Oct 2, 2024

Proposal

Add support for the ui block to be defined in job.group and job.group.task. Additionally, add support for alloc-specific ui links. Both could be achievable via some sort of url templating schema:

# replacements
# - ${job_name}
# - ${group_name}
# - ${task_name}
# - ${allocation_id}

job "vector" {
  group "vector" {
    task "vector" {
      ui {
        link {
          allocation_link = true
          label = "logs"
          url = "https://logs-ui.example.com/search?job=${job_name}&group=${group_name}&task=${task_name}&alloc=${allocation_id}"
        }
      }
    }
  }
}

Use-cases

For more complex jobs, it may be useful to link out to external services - logs and metrics being the key ones - at a group or task level. This would allow for aggregated data that is specific to those levels - which is important in jobs that have multiple groups, or cases where there are multiple tasks within a group (such as for sidecars).

Additionally, having links out for just allocations would allow folks to filter to the exact allocation that is being looked at. This is super useful when trying to figure out why one or more allocations are misbehaving.

Attempted Solutions

At the moment, I need to copy the allocation ID and then paste it into a form elsewhere. This works for me but developers may be less clear as to where to browse on external services to filter data. Worse still, it makes it more difficult to migrate across external services (as in, if I move from Grafana => DataDog or back for logs/metrics) as now I need to communicate that change to developers and teach them the new way to do things. Having those links be embeddable in the Nomad UI will make it easier for folks to use those links.

@philrenaud
Copy link
Contributor

Hi @josegonzalez , thanks for this feature request. I think it's a good one; my only pause is around the allocation_link field and I'd like to understand it better.

Is the idea that with allocation_link set to true, the link would show up at /ui/allocations/$allocID (potentially several of them, if each of an allocation's tasks had a ui link)? Or on /ui/allocations/$allocID/$taskName with some tag or icon indicating it's allocation-specific?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants