Commit Graph

57 Commits

Author SHA1 Message Date
Raphaël Pinson
6af356a2fd Use pypuppetdb with api version 4 2015-10-26 13:39:54 +01:00
Spencer Krum
5842326f2e Merge pull request #157 from corey-hammerton/inventory
puppetboard/app.py: Optimizing the inventory page
2015-10-05 18:18:59 -04:00
Corey Hammerton
52162c04a6 puppetboard/app.py: Optimizing the inventory page
Instead of querying PuppetDB for every fact that it knows about only
querying it for the fact names that it knows about. The result is a
much smaller result set that is more noticable on environments with
large numbers of nodes and/or facts.

On one environment with > 2500 fact-names and 35 nodes a curl test
to the facts endpoint without any query string returned in ~3.5 seconds.
Ran another curl test to the facts endpoint with the query string that
the code in this commit creates, the command finished in ~0.040 seconds.
2015-09-04 21:23:19 -04:00
Corey Hammerton
bce33aee0f puppetboard: Adding Catalog Viewer
This makes use of the available catalog endpoints in pypuppetdb and PuppetDB
and displays to administrators the last compiled catalog for a node,
if the variable ENABLE_CATALOG is True (defaults to False)
2015-08-19 21:01:11 -04:00
Spencer Krum
1253739bf3 Merge pull request #135 from stoyansbg/master
Added inventory page along with a navbar link.
2015-06-09 16:24:19 -07:00
Stoyan Stoyanov
f6dbb249e6 app.py: inventory - account for non-existing facts
Set the fact value to be displayed in the inventory tab to "undef"
if the fact does not exist for a node.
2015-05-12 15:15:11 -07:00
Sebastian Svensson
15f2b2c4ed renamed node in @app.route('/reports/<node>') to node_name and renamed node in {% if node.report_timestamp %} to node_name 2015-05-11 11:33:40 +02:00
Fotis Gimian
25df8c071a Allowed the ability to provide a static SECRET_KEY for use with CSRF protection (fixes #128) 2015-05-10 23:24:48 +10:00
Fotis Gimian
1b48e36ea5 Repaired failure to redirect the latest report for a node 2015-05-10 21:08:40 +10:00
Fotis Gimian
97bbe96465 Updated all Python code to be fully flake8 compliant 2015-05-10 20:08:09 +10:00
Stoyan Stoyanov
d75d5007a3 Added inventory page along with a navbar link.
Added inventory page showing a table similar to the "Nodes" one,
but containing any customizable set of facts.

A setting INVENTORY_FACTS has been added. It controls the list
of facts to be displayed along with a description for the header
of the table.
2015-05-07 14:38:25 -07:00
Julien Kassar
a01a5cf9e0 Add version and current year to the layout
Fixes #78
2015-02-27 13:39:36 -05:00
Daniele Sluijters
44188fd12a Merge pull request #91 from seantis/master
Accept the configuration_version as alternative in the report view.
2015-02-13 09:42:07 +01:00
Spencer Krum
7a0c4bd837 Selecting which graphs to show with config option
Known-good facts to graph are set as defaults. This list is merged
with whatever facts are listed in settings.py
2015-01-24 21:15:52 -08:00
Spencer Krum
3d3b7012e3 Updating redmine tickets to jira tickets 2014-11-17 17:49:29 +00:00
Denis Krienbühl
31a158c375 Accept the configuration_version as alternative in the report view. 2014-09-10 16:10:38 +02:00
stack72
f5d0f86e31 Merge remote-tracking branch 'upstream/master' 2014-06-10 21:59:02 +01:00
stack72
85dd8da276 Removing the ten_reports method and passed the reports count through to the reports_node page 2014-05-16 17:00:35 -05:00
stack72
81c71607ae Added a hacky solution to allow users to be able to set a number of reports that they wish to display on the reports panel on the node page 2014-05-16 16:37:16 -05:00
Anna Janackova
4c50b82768 adds pending nodes counter to the main dashboard
* nodes with state noop are counted towards the "pending" column in the main
  dashboard
* changes top layout to four-column
2014-04-25 16:43:37 +02:00
Daniele Sluijters
8a186afdde Revert "app: Use a ThreadPool to fetch metrics."
Using multiprocessing is at least causing mod_wsgi to throw a hissy fit.
A few other WSGI servers seem to be able to deal with this correctly but
for now, back to serial requests.
2014-03-13 15:39:20 +01:00
Daniele Sluijters
c4d1dd3596 app: Use a ThreadPool to fetch metrics. 2014-03-13 12:02:34 +01:00
Daniele Sluijters
9d1f2f7254 python3: Fix iterating over a dict. 2014-03-13 12:02:34 +01:00
Daniele Sluijters
c588ee6ce8 query: Allow to pass in query with or without []. 2014-03-13 12:02:34 +01:00
Daniele Sluijters
64f453df09 python3: Fix urllib/unquote usage. 2014-03-13 12:02:34 +01:00
Daniele Sluijters
d92a068057 Switch to using pypuppetdb 0.1.0. 2014-01-13 13:12:21 +01:00
Daniele Sluijters
cbb3b8640f Merge pull request #41 from jasperla/avg_resources
Report rounded avg. resources per node.
2014-01-13 02:41:48 -08:00
Spencer Krum
b01a749bab fix arguments to pypuppetdb connect() 2013-12-30 00:28:03 -08:00
Jasper Lievisse Adriaanse
5fa260e748 Report rounded avg. resources per node. 2013-12-23 11:08:12 +01:00
Julius Härtl
73e26e8c1c error fix, format string and css button width fix 2013-11-20 13:34:13 +01:00
Julius Härtl
08bad89041 fix for latest report in overview
* report/latest/<node_name> uses limit parameter in _query
  to get just one report
* disable "Latest Report" button if there is no report
* HTTP Status 500 if there is no report on report/latest/<node_name>
2013-11-20 11:30:08 +01:00
Spencer Krum
ac06c65d73 puppetboard/app.py: Pep8 fixes 2013-11-07 12:52:44 -08:00
Frederik Happel
b728896fea use unreported=app.config['UNRESPONSIVE_HOURS'] for node overview as
well
2013-11-06 13:00:10 +01:00
Frederik Happel
d067fe3ed3 use configuration variable UNRESPONSIVE_HOURS to determine if a node's
status is unreported
2013-11-05 18:31:54 +01:00
Daniele Sluijters
efe488aafc Add a new jsonprint filter, used in metrics, query 2013-11-05 16:41:47 +01:00
Daniele Sluijters
754784f4af Make fact value clickable.
In the Facts view you can now click on the value of a fact and get a
listing of all the nodes with that value for that fact.

Closes #13
2013-11-05 15:44:34 +01:00
Daniele Sluijters
de6a77951c app: Abort if we can't fetch metrics. 2013-11-05 12:20:48 +01:00
Julius Härtl
ffdbfcda24 nodes view filter now works with new status attribute 2013-11-05 10:49:59 +01:00
Julius Härtl
f187638b6e Enhance node status feature in overview and nodes
This commit uses the new parameter with_status from nedap/pypuppetdb#18

Node status is now shown as text with the additional information of
failed/succeded events, unreported time

The statistics on Overview now show the *number of nodes*
that have status failed/changed/unreported
2013-11-05 10:07:53 +01:00
Lars Sjöström
09b249b0ca make failed/success event counts clickable 2013-11-04 11:40:32 +01:00
Spencer Krum
7265dc2fd0 puppetboard/app.py: pep8 2013-10-29 11:41:53 -07:00
Lars Sjöström
61548c819c Add nodes with missing timestamp to unreported nodes
Skip nodes with NoneType timestamps

add nodes with missing timestamp to unreported nodes
2013-10-29 14:14:48 +01:00
Daniele Sluijters
75da9b9209 Get rid of old settings.
I broke things with 795d243e9d because I
forgot to remove it everywhere from functions and templates. Also
removed the old PUPPETDB_EXPERIMENTAL switching.
2013-10-28 21:46:34 +01:00
Daniele Sluijters
795d243e9d We now require PuppetDB 1.5 / API v3.
PUPPETDB_API is no longer configurable since we're now using features
that are v3 only. Limiting ourselves to v2 compatibility is far too
troublesome and people tend to update to newer versions of PuppetDB
fairly quickly.
2013-10-28 17:08:40 +01:00
Daniele Sluijters
c0cef0a3c0 overview: Cosmetic changes.
* Don't pass unresponsive to the view, access config[] object instead
* Remove the statistics header, it only takes up space
* Lowercase a few things
* Change the descriptions for 'radiator' to make the math work: Because
  of how PuppetDB's aggregate-events-count works nodes with both
  successful and failed events count for both causing success + failure
  + unreported to not equal population, which is weird. Now we're simply
  stating that they have failed events instead of saying that the node
  is succesful/failed.
2013-10-28 16:50:19 +01:00
Daniele Sluijters
58625b5ee0 overview: Remove command statistics. 2013-10-28 16:49:39 +01:00
Julius Härtl
bbb65939c9 remove duplicate mean_command_time 2013-10-28 15:38:45 +01:00
Julius Härtl
5ca758dd39 show list of nodes without report for x hours in overview
- the amount of hours is defined as `UNRESPONSIVE_HOURS` in default_settings.py
- small status layout improvement in nodes list
- latest report button in nodes list
- nedap/pypuppetdb repo as requirement ( new api was merged nedap/pypuppetdb#17 )
2013-10-28 11:36:37 +01:00
Julius Härtl
7c027dd97d Add basic support for node status by using the most recent report
The following frontend features are implemented
- Number of failures, successes, noops/skips in overview
- Show latest reports with 1 or more events in overview
- Direct links to latest Report
- Number and types of events in nodes list
2013-10-25 15:43:14 +02:00
Spencer Krum
23af033cbb facts: Add graph for facts endpoint. 2013-10-13 14:59:22 +02:00