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

Show Fact counts on the Dashboard #68

Open
elofu17 opened this issue May 24, 2017 · 1 comment
Open

Show Fact counts on the Dashboard #68

elofu17 opened this issue May 24, 2017 · 1 comment

Comments

@elofu17
Copy link

elofu17 commented May 24, 2017

Request:

If #67 (a new facts drill down page) is fixed, it would also be nice if the Dashboard tab could show cells linking to said page.

The cell itself should simply show a count() of the unique number of values for that fact.

In the dashboard code you need to add something to distinguish between the current querys, whom are directed at the nodes page, to a cell that is instead pointing at the fact page.

  dashboard_panels   => [
    {
      'name'  => 'Nodes with failures',
      'type'  => 'danger',
      'query' => '#node.latest_report_status="failed"'
    },
    {
      'name'  => 'Uptime',
      'type'  => 'info',
      'fact' => 'uptime_days'
    },
    ...and so on...

The keynames 'query' and 'fact' are mutually exclusive, you can only set one.

/Elof

@elofu17
Copy link
Author

elofu17 commented Aug 16, 2017

The above code would show a dashboard with two panels.
The first panel show the number of failed nodes and it links to the nodes page (https://puppetexplorer.foo.bar.se/#/nodes?query=.....).
The second panel show the number of unique uptimes (in days) of all my machines. This panel links to the new fact-drilldown page (https://puppetexplorer.foo.bar.se/#/factdrilldown?fact=.....).

So if I have 10 puppet nodes where 9 of them were just patched and rebooted, the Uptime panel might show "3". When I click on this panel, the drilldown-page show me the details of the 3 uptimes:

node      uptime_days
----------------------
server1   1
server2   0
server3   0
server4   0
server5   0
server6   0
server7   0
server8   0
server9   0
server10  23

When I think I'm done patching, puppetexplorer indicates to me that server10 has probably not been patched yet, that server1 was patched yesterday and servers 2-9 was patched today.

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

No branches or pull requests

1 participant