I'm trying to integrate Kibana with my OpenSearch ( is it possible ? ). Unfortunately I get a version error.
Is there any way to use opensearch in kibana?
These are the versions I get via curl:
curl -k -u "admin:PASSWORD" "https://IP:9200/"
{
"name" : "node-1",
"cluster_name" : "cluster",
"cluster_uuid" : "he6gqhl2S-6dlVv6dyPOEA",
"version" : {
"number" : "7.10.2",
"build_type" : "rpm",
"build_hash" : "e505b10357c03ae8d26d675172402f2f2144ef0f",
"build_date" : "2022-01-14T03:38:06.881862Z",
"build_snapshot" : false,
"lucene_version" : "8.10.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "The OpenSearch Project: https://opensearch.org/"
}
They are very tightly coupled and aren't really supposed to work together, so I doubt they will (or it would be very brittle).
If you want to have Kibana, why not Elasticsearch under the hood?
Related
I am trying to fetch the SHA_256 value from manifest.json file but unable to get using aql.
Below is the cmd I am using:
ubuntu#test:~$ **curl -sS -u sumkumar:$pw -XPOST -k -H "Content-type: text/plain" https://<URL>/artifactory/api/search/aql -d 'items.find({"repo":"xyz"},{"path":"a/b/c"}).include("*")'**
{
"results" : [ {
"repo" : "xyz",
"path" : "a/b/c",
"name" : "manifest.json",
"type" : "file",
"size" : 1579,
"created" : "2018-03-13T11:58:33.771Z",
"created_by" : "uex-sp-cd",
"modified" : "2018-03-15T14:17:38.299Z",
"modified_by" : "uex-sp-cd",
"updated" : "2018-03-15T14:17:38.299Z",
"depth" : 4,
"actual_md5" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"actual_sha1" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"original_md5" : "NO_ORIG",
"original_sha1" : "NO_ORIG",
"virtual_repos" : [ ]
},{
However, if you look the original manifest.json file from UI.It contains SHA256 value.
enter image description here
According to the AQL documentation, the item entity has the sha256 field. But it mentions the following note:
SHA-256 is supported from Artifactory version 5.5
You can only do an AQL search on an Artifact that has been deployed to Artifactory version 5.5 or above, or if you have migrated your database as described in SHA-256 Support after upgrading Artifactory to version 5.5 and above.
Please verify your Artifactory fits the requirements above.
In addition, assuming this is a Docker manifest.json, it specifically should also have the SHA256 in a property named docker.manifest.digest (and maybe also a property named sha256). To get the property values you can add "property.*" to the include(..) part of the query.
For example:
items.find({"repo":"xyz","path":"a/b/c","name":"manifest.json"})
.include("repo","path","name","sha256","property.*")
Will return something like:
{
"results" : [ {
"repo" : "xyz",
"path" : "a/b/c",
"name" : "manifest.json",
"sha256" : "34cb6f8e1e1aca...",
"properties" : [ {
"key" : "docker.manifest.digest",
"value" : "sha256:34cb6f8e1e1aca..."
},{
"key" : "sha256",
"value" : "34cb6f8e1e1aca..."
}
...
I encounter a problem in my production site in Symfony 4.2.8 (yes I know...).
When I try to launch a bin/console fos:elastica:populate or bin/console fos:elastica:reset the console crash (with -vvv option) :
Exception trace:
() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Transport/Http.php:190
Elastica\Transport\Http->exec() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Request.php:194
Elastica\Request->send() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Client.php:689
Elastica\Client->request() at /var/www/current/vendor/friendsofsymfony/elastica-bundle/src/Elastica/Client.php:58
FOS\ElasticaBundle\Elastica\Client->request() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Client.php:721
Elastica\Client->requestEndpoint() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Index.php:586
Elastica\Index->requestEndpoint() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Index.php:225
Elastica\Index->delete() at /var/www/current/vendor/ruflin/elastica/lib/Elastica/Index.php:296
Elastica\Index->create() at /var/www/current/vendor/friendsofsymfony/elastica-bundle/src/Index/Resetter.php:110
FOS\ElasticaBundle\Index\Resetter->resetIndex() at /var/www/current/vendor/friendsofsymfony/elastica-bundle/src/Command/PopulateCommand.php:184
FOS\ElasticaBundle\Command\PopulateCommand->populateIndex() at /var/www/current/vendor/friendsofsymfony/elastica-bundle/src/Command/PopulateCommand.php:164
FOS\ElasticaBundle\Command\PopulateCommand->execute() at /var/www/current/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/current/vendor/symfony/console/Application.php:926
Symfony\Component\Console\Application->doRunCommand() at /var/www/current/vendor/symfony/framework-bundle/Console/Application.php:89
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /var/www/current/vendor/symfony/console/Application.php:269
Symfony\Component\Console\Application->doRun() at /var/www/current/vendor/symfony/framework-bundle/Console/Application.php:75
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/current/vendor/symfony/console/Application.php:145
Symfony\Component\Console\Application->run() at /var/www/current/bin/console:39
In Http.php line 190:
[Elastica\Exception\Connection\HttpException]
Couldn't connect to host, Elasticsearch down?
A curl on ES server respond :
{
"name" : "prod",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "********",
"version" : {
"number" : "7.10.0",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "51e9d6f22758d0374a0f3f5c6e8f3a7997850f96",
"build_date" : "2020-11-09T21:30:33.964949Z",
"build_snapshot" : false,
"lucene_version" : "8.7.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
I create a new branch to upgrade all the component but I need a clue to operate a quick fix on production...
If somebody have an idea thank in advance.
When I try to use httpoison to query an elasticsearch server like
iex(1)> HTTPoison.get "http://localhost:9200"
I get
{:error, %HTTPoison.Error{id: nil, reason: :econnrefused}}.
If I do
curl -XGET "http://localhost:9200"
I get
{
"name" : "es01",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "Wik-EpMkQ8ummJE6ctNAOg",
"version" : {
"number" : "7.0.1",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "e4efcb5",
"build_date" : "2019-04-29T12:56:03.145736Z",
"build_snapshot" : false,
"lucene_version" : "8.0.0",
"minimum_wire_compatibility_version" : "6.7.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Does anyone know what this behavior is due to and how to fix it?
P.S.: Changing localhost to 127.0.0.1 does not solve the problem.
Here's my setup:
elasticsearch Version: 7.0.1
{:httpoison, "~> 1.5"} #=> mix.lock shows version 1.5.1 was installed
curl results:
$ curl -XGET "http://localhost:9200"
{
"name" : "My-MacBook-Pro.local",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "vEFl3B5TTYaBxPhQFuXPyQ",
"version" : {
"number" : "7.0.1",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "e4efcb5",
"build_date" : "2019-04-29T12:56:03.145736Z",
"build_snapshot" : false,
"lucene_version" : "8.0.0",
"minimum_wire_compatibility_version" : "6.7.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
HTTPoison results:
$ iex -S mix
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]
===> Compiling parse_trans
===> Compiling mimerl
===> Compiling metrics
===> Compiling unicode_util_compat
===> Compiling idna
==> ssl_verify_fun
Compiling 7 files (.erl)
Generated ssl_verify_fun app
===> Compiling certifi
===> Compiling hackney
==> httpoison
Compiling 3 files (.ex)
Generated httpoison app
==> hello
Compiling 15 files (.ex)
Generated hello app
Interactive Elixir (1.6.6) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> HTTPoison.get "http://localhost:9200"
{:ok,
%HTTPoison.Response{
body: "{\n \"name\" : \"My-MacBook-Pro.local\",\n \"cluster_name\" :
\"elasticsearch\",\n \"cluster_uuid\" : \"vEFl3B5TTYaBxPhQFuXPyQ\",\n
\"version\" : {\n \"number\" : \"7.0.1\",\n \"build_flavor\" :
\"default\",\n \"build_type\" : \"tar\",\n \"build_hash\" :
\"e4efcb5\",\n \"build_date\" : \"2019-04-29T12:56:03.145736Z\",\n
\"build_snapshot\" : false,\n \"lucene_version\" : \"8.0.0\",\n
\"minimum_wire_compatibility_version\" : \"6.7.0\",\n
\"minimum_index_compatibility_version\" : \"6.0.0-beta1\"\n },\n
\"tagline\" : \"You Know, for Search\"\n}\n",
headers: [
{"content-type", "application/json; charset=UTF-8"},
{"content-length", "522"}
],
request: %HTTPoison.Request{
body: "",
headers: [],
method: :get,
options: [],
params: %{},
url: "http://localhost:9200"
},
request_url: "http://localhost:9200",
status_code: 200
}}
iex(2)>
Next, I stopped the elasticsearch server, then I ran the HTTPoison request again:
ex(2)> HTTPoison.get "http://localhost:9200"
{:error, %HTTPoison.Error{id: nil, reason: :econnrefused}}
I got similar results for the curl request:
$ curl -XGET "http://localhost:9200"
curl: (7) Failed to connect to localhost port 9200: Connection refused
What happens if you issue two curl requests in a row? Do they both succeed? Try issuing the HTTPoison request first, then the curl request. Which one fails? Try the reverse order. Same results?
I'm almost positive you have the same problem that I did. Check to make sure you are not forcing ipv6 in your /etc/hosts file.
If you have something like this:
::1 localhost
...get rid of it and Httpoison should work again
My mongodb is looking like this :
"_id" : ObjectId("5751749723be8328848af30e"),
"mem_id" : 1.0,
"mem_name" : "Member1",
"home" : "8001234567",
"mobile" : "8771231234",
"email" : "jd#example.com",
"mem_create_date" : ISODate("2016-06-03T12:14:15.642Z"),
"paymethod" : {
"pm_id" : "99991",
"pm_name" : "FA11",
"pm_create_Date" : ISODate("2013-12-09T21:05:00.000Z"),
"routing_no" : "075000051"
},
"payee" : {
"pae_id" : "88881",
"pae_name" : "Payee1",
"home" : "800-123-45671",
"mobile" : "877-123-12341",
"email" : "jd#example.com",
"act_no" : "0213654781",
"pae_create_date" : ISODate("2013-12-09T21:05:00.000Z"),
"payment" : {
"pmt_id" : "66661",
"pmt_amt" : "71",
"pmt_create_date" : ISODate("2013-12-09T21:05:00.000Z"),
"pmt_type" : "check"
}
}
}
I need to get these values with the help of mongolite and show them in a plot/graph with R shiny web app.
I could not find any example with nested mongodb on net. And whenever i am trying to read the data i am getting the below err :
error in if (inherits(x j dataframe ) && ncol(xj) 1l) x j - as.matrix(x j )
Can anyone please help/guide me here. I am a java developer but i am new to R language.
Thanks.
Here is what you get in mongo shell :
db.col.find(ObjectId("5571849db1969e0a6eb32731")).pretty()
{
"_id" : ObjectId("5571849db1969e0a6eb32731"),
"name" : "Some name",
"logo" : "Some logo",
"users" : [
ObjectId("5571830031c7fc341bc2e105"),
ObjectId("5571830031c7fc341bc2e107")
],
"admins" : [ ],
"__v" : 0,
"steps" : 5782
}
Here is what I get in rmongo :
myResult <- mongo.find(Connexion, "db.col", query='ObjectId("5571849db1969e0a6eb32731")')
#Error in mongo.bson.from.JSON(arg) :
# Not a valid JSON content: ObjectId("5571849db1969e0a6eb32731")
So, how to do it right ?
Just in case : I had a look at this already. But mongolite doesn't support authentication (which is therefore a no-go) and I don't understand what to do with the second answer. If I try
result <- mongo.find(Connexion, "db.col", query=mongo.oid.from.string("5571849db1969e0a6eb32731"))
I get
# Error in mongo.bson.from.argument(query) : Can't convert to bson: argument should be one of 'list', 'mongo.bson' or 'character'(valid JSON)
This should work:
result <- mongo.find(Connexion, "db.col", query=list('_id' = mongo.oid.from.string("5571849db1969e0a6eb32731")))