Commit Graph

16 Commits

Author SHA1 Message Date
Andy Ladjadj 67f55d53d6 Add capability to use grafana folderid parameter
- retro-compatibility with default folder 'General' == 0
 - add to config file with folderid key in grafana section
 - add to cmd with --grafana-folderid

Change-Id: Iebfc5613f4c622d3d49d2f34df77ad3695f6b046
2019-02-26 21:25:37 +00:00
akrzos 2cee4f2908 Add Grafana URL and API Key to GrafYaml CLI
This will allow the use of GrafYaml called from Ansible without
deploying a GrafYaml config file.  With Ansible we can use the template
module to deploy a jinja2 templated GrafYaml dashboard for more
flexibility.

Change-Id: I61a7142c3177681681dcbfe5c889f4c3d59f8ec4
2018-01-15 09:17:05 -05:00
Paul Belanger 5a1745dd22 Remove duplicate version code
Change-Id: I209ec158bde5a45522dddda78531bf5ec9d3a0b8
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-10 14:13:01 -05:00
Paul Belanger 2c92819451 Add datasource support
We now support the ability to create a datasource using yaml files.

Change-Id: I1db38ac25bc309398924c15635ea5dee4eaf264c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-03 12:36:59 -05:00
Jenkins 3f9732a20f Merge "Disable cache support when using validate" 2015-10-23 14:50:35 +00:00
Jenkins 4f89516bf0 Merge "Create default configuration" 2015-10-23 14:42:39 +00:00
Paul Belanger b87979c13c Disable cache support when using validate
Since we never use any of the functionality when validating, we'll
disable it.

Change-Id: I8432acc4ff847a3e99bef10449969a01c8fc2795
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-22 20:15:19 -04:00
Paul Belanger 1bb25348e9 Create default configuration
Here we are creating a simple wrapper object to ConfigParser for the
purpose of simplifying our configuration. Now, we have a single
location to control our configuration defaults.

Change-Id: Ie49938b1eec183055bb8d462d70bcdfb733b360b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-22 18:28:00 -04:00
Paul Belanger fd76590e4b Add delete command to CLI
Add the ability to delete dashboards based on the provided yaml file.
We also removed the assert_dashboard_exists function, as it didn't
really save us code.

Change-Id: I417a72fcc5252b36cadfe8881b4f5ca6acb7c753
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-16 11:33:32 -04:00
Paul Belanger 4e643e5d06 Replace oslo_config dependency with argparse
This is for the same reasoning as oslo_log. We don't want to depending
on OpenStack libraries.

Change-Id: I34e66af578d3f4b5ac5e710554aad91524285816
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-09 10:12:57 -04:00
Paul Belanger 3a66817727 Replace oslo_log dependency with standard logging
When I first started grafyaml, I wanted to better understand how
existing OpenStack libraries worked. So, with that in mind, I choose
oslo_log as the logging class for this program.  However, now that we
have imported it under openstack-infra, we don't really want to depend
on OpenStack libraries, incase there is a breakage.  The main reason
for this, if OpenStack libraries break, we still want the
infrastructure to work so we can fix the problem.

Change-Id: Iee9b1d9d9abb4da4d285531b64a7e2505240be12
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-06 09:15:20 -04:00
Paul Belanger 073d7c6806 Add some verbose message for validate / update commands
When you run grafana-dashboards, it currently lacks some basic
information what it is actually doing.  So, start building out some
logging to help others who decide to run the command.

Change-Id: I27b0c444139c5772b29ae3bd2c9550c6567dd4d6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-05 14:22:41 -04:00
Paul Belanger f4b18fdd74 Add validate command
Like JJB, Zuul and Nodepool, we need to have a CLI command to validate
our configuration files.

Change-Id: I4ccac21a2d77917667e1e844ab9ee1f1f281ea9f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-10-01 09:59:21 -04:00
Paul Belanger 103a882cbf Add caching support
Like we do with JJB, we create a md5sum of the dashboard then cache
it.  This is a simple way to determine if a yaml file has changed.

Change-Id: If7b80b84c5bbcb0d30b0325bae6b8e726bb2f41b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-29 11:34:31 -04:00
Paul Belanger 4b14f334f6 Add oslo.log for logging
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-05-06 16:01:03 -04:00
Paul Belanger e117767f9b Add grafana-dashboards cli client
This is the first attempt at the CLI client.  Right now, we just support the
update function, which will blindly create a dashboard in grafana with ZERO
validation.  Additionally, we blindly override any existing dashboard that has
been created.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-05-06 13:02:55 -04:00