or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
tags:
Design
,Elastic
triple-ci team needs to be able to query rdo es/logstash in order to reconfigure elastic-recheck to use rdo servers.
What is failing now
https://opensearch.logs.openstack.org/_dashboards/app/discover/?security_tenant=global#/ is the new opensearch. Next task is to
We are not touching the Openstack health repo as it had complex backend tools which are all gone now
The discussion with QE/TC:
old
~~ rdo elasticsearch has a username/passwd. So the check jobs which connect to elasticsearch and verify queries and stuff needs access to the creds (they ran previously with upstream es without creds) There are 2 ways to do it
Connecting Elastic Recheck to RDO
The URLs used by ER to connect to upstream logstash and elasticsearch:
ES_URL = http://logstash.openstack.org:80/elasticsearch
LS_URL = http://logstash.openstack.org
How they are used in code:
ES_URL is passed directly to pyelasticsearch.ElasticSearch()
<LS_URL>/#/dashboard/file/logstash.json?<logstash_query> - This is used to form the link to logstash under the graph in ER (I think so)
What we found:
We logged in with kibana/<long_password>. Then:
https://review.rdoproject.org/analytics/app/discover/? - This is a view of the dashboard and the queries work here just as in upstream. But If we try GET (with/without basic auth) on this it returns html. This is not the API endpoint.
https://review.rdoproject.org/analytics/app/dev_tools#/console - We can query here (on the webpage). But looks like the kibana user doesn't have permissions - returns 403
https://elk.review.rdoproject.org:9200/_search - When we select copy as curl from ^ we get this. But if we try to hit this url (with/without basic auth) it times out.
Next step
Questions:
Q1. What are the equivalent for these in RDO? A1. "https://elk.review.rdoproject.org:9200/_search" is the elasticsearch URL for RDO "https://review.rdoproject.org/elasticsearch/logstash-*/_search" is the kibana URL for RDO
Q2. Can we access the elk url from our localhost (not only from a designated server) A2. Need to check.
context:
Q3. Using the kibana user to curl ^ returns 403 (http://paste.openstack.org/show/807021/) Could we have an unrestricted user/account?
context:
A3. We were using the API wrong. Needed to pass the index "logstash-* " pattern in the url. Note for later:
Q4. Where can we get a cert to connecto to the ES url?
context:
Q5. Access The endpoint /_status (https://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-status.html) has moved to /_stats (https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-status.html) to access it the user need extra user privileges .
A5. https://projects.engineering.redhat.com/browse/RHOSZUUL-577 https://softwarefactory-project.io/r/c/software-factory/sf-config/+/22291
Q6. pythonclient version that works with both rdo and upstream The endpoint /_status (https://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-status.html) has moved to /_stats The code used pyelasticsearch client which doenst seem to have an api for _stats (why are we not using elasticsearch ?) https://github.com/pyelasticsearch/pyelasticsearch/issues/202 https://github.com/pyelasticsearch/pyelasticsearch/issues/192
A6. We will move to a separate branch for rdo https://review.opendev.org/c/openstack/project-config/+/803473
Q7. Cant debug Pytests with pdb - 'module' object has no attribute 'Cmd' A7. https://bugs.launchpad.net/openstack-gate/+bug/1522553 - do this
Q8. Fix er-bot (tbd)
Q9. One job from upstream ( I suggest containers-multinode ) should have logs imported to rdo's elastic db. Sounds like gearman triggering is involved. TO-DO: work w/ rdo-infra to drive a change that gets pulled into rdo's elastic Cards opened in RDO:
Setting up a copy connected with RDO ES
To test from hlth server:
ES -> [centos@tripleo-health-temp ~]$ curl -XGET "https://kibana:<passwd>@elk.review.rdoproject.org:9200/logstash-*/_search" –insecure -H 'Content-Type: application/json' -d'{ "query": { "match_all": {} }}'
Frontend -> curl -XGET "https://kibana:<passwd>@review.rdoproject.org/elasticsearch/logstash-*/_search" -H 'Content-Type: application/json' -d'{ "query": { "match_all": {} }}'
We have a generic query which should always return something. This is needed to build the initial htmls. Originally it was
message: "Playbook run failed" AND tags:"console" AND filename:"job-output.txt" AND project:"tripleo" AND build_status:"FAILURE" AND voting:"1" AND build_queue:"check"
Sova
How sova patterns works
sova-patterns.json has 2 main keys/sections -
regex
andpatterns
regex
has fieldsregex
which is the actual regular expression to searched in the files, andname
which is a unique readable identifier for the regex.patterns
has keys/sections which correspond to type of files (like console, error, syslog, ironic-conductor etc)multiline
which is true for mutiline regexes Each of these sections has items which hasid
pattern
which refers to the regexname
inregex
section. If there are no regexes for it then this pattern is the regexlogstash
(again refers to the regex section but I think it is not used anywhere)msg
- this is what user sees in the output file name after sova finds the corresponding regex in the filestag
- denotes type of failure - infra/code etcTo move an existing sova regex from sova-patterns.json to queries.yml
patterns
in output/sova-patterns.json. This is the file that sova currently uses. Example 1:^ Here "Stack overcloud CREATE_COMPLETE" is not present in
regexes
. So this is how it will look after conversion to new format.Example 2:
^ Here "iron_space_re" is present in
regexes
So this is how it will look after conversion to new format.
https://bugs.launchpad.net/openstack-gate/+bug/1522553
To run tripleo ci health dashboard (with RDO Elasticsearch)
Notes