Search special characters in kibana - elasticsearch

I have ELK 6.8.1 version for log analysis. Now I need to search some strings via the Kibana search bar.
I need to find the logs include "] ERROR (". I tried:
message: "\] \ERROR \("
But nothing worked. Can anyone have experience help me with it? Thanks!

= && || > < ! ( ) { } [ ] ^ " ~ * ? : \ / + - are all reserved characters.
These need to be escaped.
Try escaping them twice.
message: "\\] ERROR \\("

Related

jmeter+influxdb Backend Listener: howto specify password?

I use Jmeter Backend Listener url:
influxdbUrl = http://XX.XXX.XX.XXX:8086/write?db=JMeter&u=jusr&p=C-UBBC-"<
I get an error:
java.lang.IllegalStateException: Failed calling setupTest Caused by: java.net.URISyntaxException: Illegal character in query at index 76: http://XX.XXX.XX.XXX:8086/write?db=JMeter&u=jusr&p=C-UBBC-"<
Problem in special characters in password: C-UBBC-"<
How to fix it?
Not every character is allowed in an URL, you can use alphanumeric and few special ones, in particular ; , / ? : # & = + $ - _ . ! ~ * ' ( ) #. Everything else needs to be percent-encoded
Wrap your password into __urlencode() function and it should resolve your issue.
More information on JMeter Functions concept: Apache JMeter Functions - An Introduction

ML Gradle task.Server.Eval.Task setting variables using xquery

I'm using ml-gradle to run a block of XQuery to update the MarkLogic database. The problem I am running into is I need to wrap all of the code in quotes, but since the code itself has quotes in it I am running into some errors when I try to declare variables i.e. let $config. Does anyone know a way around this? I was thinking I could concatenate all of the code into one big string so it ignores the first and last quotation.
task addCron(type: com.marklogic.gradle.task.ServerEvalTask) {
xquery = "xquery version \"1.0-ml\";\n" +
"import module namespace admin = \"http://marklogic.com/xdmp/admin\" at \"/MarkLogic/admin.xqy\";\n" +
"declare namespace group = \"http://marklogic.com/xdmp/group\";\n" +
" let $config := admin:get-configuration()\n" +
It bombs out when it is trying to declare $config as a variable. With the error:
> Could not get unknown property 'config' for task ':
Here is an example that works
task setSchemasPermissions(type: com.marklogic.gradle.task.ServerEvalTask) {
doFirst {
println "Changing permissions in " + mlAppConfig.schemasDatabaseName + " for:"
}
xquery = "xdmp:invoke('/admin/fix-permissions.xqy', (), map:entry('database', xdmp:database('" + mlAppConfig.schemasDatabaseName + "')))"
}
Here is some documentation for ServerEvalTask: https://github.com/marklogic-community/ml-gradle/wiki/Writing-your-own-task
I suspect you are hitting some string template mechanism in Groovy/Gradle. Try escaping the $ sign as well.
Note that you can use both single and double quotes in XQuery code.
HTH!

Error in Apache Spark called input path does not exist

Are there any algorithms in Apache Spark to find out the frequent patterns in a text file. I tried following example but always end up with this error:
org.apache.hadoop.mapred.InvalidInputException: Input path does not exist: file:
/D:/spark-1.3.1-bin-hadoop2.6/bin/data/mllib/sample_fpgrowth.txt
Can anyone help me solve this problem?
import org.apache.spark.mllib.fpm.FPGrowth
val transactions = sc.textFile("...").map(_.split(" ")).cache()
val model = new FPGrowth()
model.setMinSupport(0.5)
model.setNumPartitions(10)
model.run(transactions)
model.freqItemsets.collect().foreach {
itemset => println(itemset.items.mkString("[", ",", "]") + ", " + itemset.freq)
}
try this
file://D:/spark-1.3.1-bin-hadoop2.6/bin/data/mllib/sample_fpgrowth.txt
or
D:/spark-1.3.1-bin-hadoop2.6/bin/data/mllib/sample_fpgrowth.txt
if not work, replace / with //
I assume you are running spark on windows.
Use file path like
D:\spark-1.3.1-bin-hadoop2.6\bin\data\mllib\sample_fpgrowth.txt
NOTE : Escape "\" if necessary .

Ruby Net::FTP throws error when directory contains one or more spaces

I am attempting to crawl through my FTP site with ftp.list(parent_path)
Whenever the parent_path variable contains a space, I get the following error
Ftp LIST exception: Net::FTPPermError detail: 550 /Download/Dimension: The system cannot find the file specified.
Ftp LIST exception: the parent_path (if present) was : /Download/Dimension Data
Here is my code snippet
begin
#logger.error("on #{ip} : " + ftp.system())
entry_list = parent_path ? ftp.list("#{parent_path}") : ftp.list
rescue => detail
retries_count += 1
#logger.error("on #{ip} : Ftp LIST exception: " + detail.class.to_s + " detail: " + detail.to_s)
#logger.error("on #{ip} : Ftp LIST exception: the parent_path (if present) was : " + parent_path)
I have tried escaping the spaces with a \ and I tried using %20, not sure what else to try...
Any ideas, thoughts, suggestions, etc, on how to get ftp.list to honor or escape the spaces is greatly appreciated!
Are you using Windows? This problem comes up when the ftp site's OS is Windows. I turned all of my spaces to underscore. I wish there was a better solution.

AND Operator in af:resource in javascript throwing error

within af:resource component in javascript, use of the && for comparison throws the following error:
Expected name instead of &
The second ampersand is highlighted with a wavy red underscore when this error is thrown.
The sample code is shown below.
blnTargetRowReady = (targetIndex==1 && targetDestinationComponent.getValue()==null && targetOriginComponent.getValue()==null && targetSelectComponent.checked==false && targetDateComponent.getValue()!=null);
I notice when i subsitute the && with || this error does not occur.
Does anyone know why this error occurs on the page. The page runs fine when run in the browser, ie with the ampersand, but in JDeveloper the relevant page shows up with an error.
Any guidance you can provide i would appreciate it.
In your code, try to replace each ampersand with &
blnTargetRowReady = (targetIndex==1 && targetDestinationComponent.getValue()==null && targetOriginComponent.getValue()==null && targetSelectComponent.checked==false && targetDateComponent.getValue()!=null);

Resources