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

Introducing a new component monitoring-integration(1st milestone) #218

Merged
merged 14 commits into from
Aug 10, 2017

Conversation

GowthamShanmugam
Copy link
Contributor

tendrl-bug-id: #179

Signed-off-by: GowthamShanmugam [email protected]

@GowthamShanmugam
Copy link
Contributor Author

configuration of grafana, based on the topology changes in etcd. Some of these
responsibilities would be:

* monitoring-integration should to store predefined json’s for dashboards, panels and alerts.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/should to store/should store/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will change it

* monitoring-integration should to store predefined json’s for dashboards, panels and alerts.
* Keeping track of the topology changes in etcd to configure the grafana dashboards
to ensure that the correct nodes are part of the respective cluster dashboards.
* Configuring grafana authentication and authorisation (https://github.com/Tendrl/specifications/pull/205),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/authorisation/authorization/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


== Use Cases

* Monitoring-integration should able to configure grafana dashboard and panels
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/should able/should be able/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


* Monitoring-integration should able to configure grafana dashboard and panels
and alerts.
* User should able access grafana dashboard via tendrl user interface using
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/should able/ should be able to/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

4. Dashboard
5. Dashboard version
6. Data source
7. Organisation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Organisation/Organization/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Introduced a new component monitoring integration in tendrl.

Monitoring integration should have all predefined json files. When monitoring
integration stats it should start the script to configure the grafana environment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/stats/starts/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* Create a new tendrl component called monitoring-integration
* Create a directory called grafana to place all predefined json files and configuration
files for grafana.
* Create a files in grafana directory to configure the grafana environment using
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Create a files/ Create files/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

predefined jsons.
* Create a grafana configuration file called grafana.conf.yml
* create a graphite configuration file called graphite.conf.yml
* Create a directory called server to create an endpoint for receive grafana
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/for receive/for receiving/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


== Assignee(s):

Gowtham S & Rishub jain
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use github IDs here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


== Work Items:

None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put the specific issues links here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@GowthamShanmugam GowthamShanmugam force-pushed the monitoring_integration branch from b582a02 to 0818cdf Compare July 27, 2017 06:37
@GowthamShanmugam
Copy link
Contributor Author

@shtripat changes are done

@GowthamShanmugam
Copy link
Contributor Author

@brainfunked @r0h4n @nnDarshan @anivargi please review

predefined jsons.
* Create a grafana configuration file called grafana.conf.yml
* create a graphite configuration file called graphite.conf.yml
* Create a directory called server to create an endpoint for receive grafana
* Create a directory called server to create an endpoint for receiving grafana
alert events and convert that alert events into tendrl alert condition and pass the

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are we going to store the default values like:
default panel, dashboard, database name, and other details.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is in predefined json only ...is hat correct @anivargi

responsibilities would be:

* monitoring-integration should store predefined json’s for dashboards, panels and alerts.
* Keeping track of the topology changes in etcd to configure the grafana dashboards
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How this is done? is that done as part of this spec?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is not for this milestone. we are going to use default values

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anivargi need your comment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless of when it is done, please add the details in the spec

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have mentioned that in under second milestone section
https://github.com/Tendrl/specifications/pull/218/files#diff-339c615a84970e1b496c5433f62b799f

Flow structure for that may be covered in different spec in second milestone


== Use Cases

* Monitoring-integration should be able to configure grafana dashboard and panels
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per yesterday's discussion, I think this is the only use-case addressed in first milestone. State this explicitly on the spec issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok i will add this point in spec


Grafana is used for visualizing time series data in graphs. Based on the metrics
from datasource it will create graphs and display. Grafana supports different kinds
of http api's to configure its environment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are grafana APIs used as part of this spec? Can you list them and purpose of each?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rishubhjain can you list down the API's that you have used to configure grafana?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will add that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel @cloudbehl needed actual end-points here

keep track of the topology changes in etcd to configure the grafana dashboards.

Monitoring integration should have all grafana related packages as dependency.
When cluster is created or imported, the flow will install the monitoring integration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Monitoring integration is installed when the cluster imported/created? So you mean it is per cluster? I don't think this is correct. Per my understanding this service(grafana as well) is per tendrl instance(just like performance monitoring) and dash board poulation should be done as part of import
If that is the case, how monitoring integration is installed?(I assume via tendrl-ansible). Please provide the complete workflow here

@anivargi , @brainfunked , please comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i got your point, i need more info on this flow

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is just 1 instance of monitoring-integration + grafana installed across all clusters.

Introduce a new component monitoring integration in tendrl.

Monitoring integration should have all predefined json files. When monitoring
integration starts it should start the script to configure the grafana environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when someone restarts monitoring-integration?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to maintain a state within monitoring-integration which mentions if the grafana configuration is already done or not. If its already done, dont do it again. May be an entry in etcd would work.

I remember this was taken in performance-monitoring, where it used to execute configure-collectd on nodes only once. Check the logic from there as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nthomas-redhat for first milestone we are creating monitoring-integration like this, if monitoring integration start then it will start configure grafana. we are not decided complete flow of monitoring integration yet

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shtripat @nthomas-redhat For the 4th drop the role of monitoring integration is just to create default dashboards.A check already exists which does not create/update the dashboards again if the dashboards already exists.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.


* Monitoring-integration should be able to configure grafana dashboard and panels
and alerts.
* User should be able access grafana dashboard via tendrl user interface using

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not a part of 1rst Milestone

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is gafana access is always anonymous?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for the 4th drop it is

}
```

For each grafana configuration different predefined json is maintained in monitoring

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion instead of grafana configuration it should be grafana dashboard

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Monitoring integration also monitors the alerting event from grafana and notify it
to user via tendrl (https://github.com/Tendrl/specifications/pull/198).

monitoring integration passes dashboard related metrics in dashboard json. Alert

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

monitoring -> Monitoring

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@GowthamShanmugam
Copy link
Contributor Author

configuration of grafana, based on the topology changes in etcd. Some of these
responsibilities would be:

* monitoring-integration should store predefined json’s for dashboards, panels and alerts.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

monitoring-integration - > Monitoring-Integration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i will change this

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Monitoring Integration stores json for default dashboard which contains details about panels, alerts and metrics

configuration of grafana, based on the topology changes in etcd. Some of these
responsibilities would be:

* Monitoring-integration should store predefined json’s for dashboards, panels and alerts.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Monitoring-integration should create default dashboards in grafana using predefined json.
The dashboard json contains details regarding panels.,metrics and alerts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


For 1st milestone:

* Monitoring-integration should be able to configure grafana dashboard and panels.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Monitoring-Integration will create default dashboards in grafana

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

For 1st milestone:

* Monitoring-integration should be able to configure grafana dashboard and panels.
* Allow tendrl users to access grafana using anonymous authorization.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not included in the 1st milestone

* Grafana alerting events should be notified via tendrl.
* Monitoring-integration should be able to configure grafana based on topology
changes in etcd.
* User should be able access grafana dashboard via tendrl user interface using
Copy link

@rishubhjain rishubhjain Aug 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this refer to #191?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on that only authentication logic will change here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11. Others

Monitoring integration is the component which will be used to configure the grafana
environment when it is started. Monitoring integration is going to have all json

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Monitoring Integration will contain json related to default dashboards

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this statement looks like static for 1st milestone

@GowthamShanmugam
Copy link
Contributor Author

@r0h4n @anivargi @rishubhjain @nthomas-redhat updated all changes

@@ -0,0 +1,396 @@
= Spec - Introducing a new component monitoring-integration

A new component called Monitoring-Integration is introduced which integrates Grafana
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Monitoring-Integrtaion/monitoring-integration/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


Grafana is used for visualizing time series data in graphs. Based on the metrics
from datasource it will create graphs and display. Grafana supports different kinds
of http api's to configure its environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel @cloudbehl needed actual end-points here

10. Snapshot
11. Others

Monitoring Integration will contain json related to dashboards. Monitoring integration should
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everywhere use the name as monitoring-integration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Monitoring integration and grafana server are installed via tendrl-ansible in server machine.
There is just one instance of monitoring-integration and grafana installed across all clusters.
For now when monitoring integration starts then it will create gafana dashboards
using some predefined json files (Entire flow is not planned yet).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of saying this may be you can say the flow structure is out of scope of this specification.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


The json is sent to grafana server as http api request.

JSON Body schema:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If its a JSON payload, can you add a sample JSON payload data itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Grafana APIs used in monitoring integration:

1) Dashboard API:
To creates a new dashboard or updates an existing dashboard.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/updates/update/


=== Tendrl/node_agent impact:

Cluster creation or import cluster flow should install the monitoring-integration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't monitoring-integration be installed by tendrl-ansible in the server node already and during create/import only the grafana configurations should be deployed and enabled?
I understand this might not be planned for milestone-1 though :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya i will change it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not for miles stone one


* User should be able access grafana dashboard via tendrl user interface using
tendrl authentication.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you planing to handle the updates?for ex updates to json files during yum update?
Also monitoring-integration as a service?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These things are planned for 2nd milestone, For now monitoring-integration is just a one time manual run.
It is now it work just like a script.

So @TimothyAsir is working on .spec after that only we will change monitoring-integration as service

@GowthamShanmugam GowthamShanmugam changed the title Introducing a new component monitoring-integration Introducing a new component monitoring-integration(1st milestone) Aug 8, 2017
@GowthamShanmugam
Copy link
Contributor Author

@r0h4n please review

Copy link
Contributor

@nthomas-redhat nthomas-redhat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take out milestone-2&3 items from the spec and file specific issues to track them. rest looks ok

== Problem description

The new monitoring-integration component would primarily focus on dynamic
configuration of grafana, based on the topology changes in etcd. Some of these
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we doing any dynamic configuration based on the topology changes in milestone 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no i will remove it


* Monitoring-Integration will create default dashboards in grafana.

For 2nd milestone:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heading talks about milestone-1 and you have details about milestone-2 & 3 here. As we talked about in various discussions, take this out from this spec, file specific issues for milestone-2 & 3 items. We need milestone specific specs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove it

The dashboard json contains details regarding panels, metrics and alerts.
* Configuring grafana authentication and authorization (https://github.com/Tendrl/specifications/pull/205),
based on changes in the primary tendrl AA scheme.
* Keeping track of the topology changes in etcd to configure the grafana dashboards
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping track of the topology changes is something which is done in milestone-1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will remove it

@GowthamShanmugam
Copy link
Contributor Author

@nthomas-redhat spec is modified to 1sr milestone please review

@GowthamShanmugam
Copy link
Contributor Author

@r0h4n @shtripat please review

@r0h4n r0h4n merged commit da44433 into Tendrl:master Aug 10, 2017
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

Successfully merging this pull request may close these issues.

8 participants