Ref. Wiki
Camel case may start with a capital or, especially in programming languages, with a lowercase letter.
Ex. ageOfStudent => the age of the student.
Ref. Wiki
Camel case may start with a capital or, especially in programming languages, with a lowercase letter.
Ex. ageOfStudent => the age of the student.
Download and install JDK.
Edit Windows Environment setting. (Advanced system settings => Advance => Environment variables => Choose Path and click edited => Add the location of the bin folder of the JDK installation.)
Ex: “C:Program Files (x86)Javajre1.8.0_31bin”
Check the Step. 2. Open the command window and run “java -version”.
C:UsersCS>java -version
java version “1.8.0_40”
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
Download the Eclipse IDE and extract it. Then you can start to make some java codes with Eclipse IDE.
If we want use excel to get the value F.
F = A * B * C * D * E
The common method is using the upper mathematical formulas. But if we adjust the columns, we may get the wrong value because there are some exceptions in the reference columns. So if we can use E to find the location of A or B, this problems are not exit. If E’s location is W7.
W7 = LOOKUP(2,1/($H$5:$H7<>""),$H$5:$H7) * LOOKUP(2,1/($M$5:$M7<>""),$M$5:$M7),$P7,S7) * P7 * R7
When we list the indexes, we will get the status information. It shows the health of index in the elasticsearch cluster.
Because in the our experiment environment, we do not use the elasticsearch cluster. So the status is yellow is right.
When we deleted the indexes, the data were just marked by deleted.
We can list all indexes to show status.
sudo curl 'localhost:9200/_cat/indices?v'
It will show the health, index name, pri, rep, docs.count, docs.deleted, store.size, pri.store.size.
health index pri rep docs.count docs.deleted store.size pri.store.size
yellow kibana-int 5 1 5 0 66.7kb 66.7kb
yellow logstash-2015.02.13 5 1 402030 3366353 1.2gb 1.2gb
yellow logstash-2015.02.18 5 1 86843 3393979 1.1gb 1.1gb
yellow logstash-2015.02.15 5 1 218402 3063776 1.2gb 1.2gb
yellow logstash-2015.02.03 5 1 178621 2072000 756.3mb 756.3mb
yellow logstash-2015.02.06 5 1 466185 2479658 963.4mb 963.4mb
yellow logstash-2015.02.24 5 1 364473 0 166.5mb 166.5mb
yellow logstash-2015.02.02 5 1 313488 1838855 710.1mb 710.1mb
yellow logstash-2015.02.07 5 1 371602 3397300 1.2gb 1.2gb
yellow logstash-2015.02.21 5 1 3583288 0 1.2gb 1.2gb
yellow logstash-2015.02.22 5 1 3554707 0 1.1gb 1.1gb
yellow logstash-2015.02.23 5 1 3680625 0 1.2gb 1.2gb
If we want to clear the deleted indexes, we can optimize it.
sudo curl -XPOST 'http://localhost:9200/_optimize'
And it will reply this message.
{"_shards":{"total":310,"successful":155,"failed":0}}
Then when we list all indexes again, we will see the deleted indexes are gone.
cowman@roamingcacti:~$ sudo curl 'localhost:9200/_cat/indices?v'
health index pri rep docs.count docs.deleted store.size pri.store.size
yellow kibana-int 5 1 5 0 66.5kb 66.5kb
yellow logstash-2015.02.13 5 1 402030 1512300 611.7mb 611.7mb
yellow logstash-2015.02.18 5 1 86843 1374178 491.9mb 491.9mb
yellow logstash-2015.02.15 5 1 218402 1404862 536.7mb 536.7mb
yellow logstash-2015.02.03 5 1 178621 2072000 756.2mb 756.2mb
yellow logstash-2015.02.06 5 1 466185 2479658 963.4mb 963.4mb
yellow logstash-2015.02.24 5 1 378777 0 156.9mb 156.9mb
yellow logstash-2015.02.02 5 1 313488 1838855 710.1mb 710.1mb
yellow logstash-2015.02.07 5 1 371602 1394610 566.5mb 566.5mb
yellow logstash-2015.02.21 5 1 3583288 0 1.2gb 1.2gb
yellow logstash-2015.02.22 5 1 3554707 0 1.1gb 1.1gb
yellow logstash-2015.02.23 5 1 3680625 0 1.2gb 1.2gb
Because the limitation of snmp, when the disk space is more than 8TB, we will get the wrong value. Whether we use snmpwalk or snmpget, the results are all the same. Therefore, we need to restore the correct value.
If we get the disk space is A, and the block size is B.
if (A <0){
return (A + 4294967296) * B;
} else {
return A * B;
}
Then we will get the C.
If we want to calculate the disk space in GB.
return C * B / 1024 / 1024
The original warning message is this.
"You are using a deprecated config setting "pattern" set in grok. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. You should use this instead: match => { "message" => "your pattern here" } If you have any questions about this, please visit the #logstash channel on freenode irc.""
And here is the original server config.
if [type] == "nginx-access" {
grok {
type => "nginx-access"
pattern => "%{NGINXACCESS}"
patterns_dir => ["/opt/logstash/patterns"]
}
}
So what we should do is modify the config. Using the match function to replace the pattern, like this.
if [type] == "nginx-access" {
grok {
patterns_dir => "/opt/logstash/patterns"
type => "nginx-access"
match => ["message", "%{NGINXACCESS}"]
}
}
In default, sublime text editor does not support BIG5 character, so you must install “ConvertToUTF8” package.
If I want to search information within these seven days.
@timestamp:["now-7d" TO "now"]
If I want to search information between 2015-01-01 and 2015-01-31.
@timestamp:["2015-01-01" TO "2015-01-31"]
If I want to search information between 2015-02-01 13:00:00 and 2015-02-01 18:00:00.
@timestamp:["2015-02-01T13:00:00" TO "2015-02-01T18:00:00"]
When we want to find some way to get the count of the quota exceed event, we might find this page “Splunk > Wiki : Community:TroubleshootingIndexedDataVolume Troubleshooting Indexed Data Volume”.
Then we could use the following to get the count.
index=_internal source=*license_audit.log LicenseManager-Audit
| streamstats current=f global=f window=1 first(quotaExceededCount) as next_quotaExceededCount by host
| eval quotadiff = next_quotaExceededCount - quotaExceededCount
| search quotadiff>0
But in my case, I only want to know the last value of the quotaExceededCount. So I modified it.
index=_internal licensemanager | stats first(quotaExceededCount) by host
Finally, I would use the quotaExceededCount value to judge is not able to import data.