Combine two fields of two different log lines in same index pattern - kibana

I'm new to Kibana, i have two log patterns in same index pattern
Example
log line 1 : rejected with ID 123456
log line 2 : rebooking is successful for ID 123456 for US country
I need to create bar chart for country base on the matched ID , something like this "select country from log where message contains "rebooking" AND ID is in (select ID from log where message contains "rejected") "
Please help !

The logs that you're inserting into the ES cluster should be normalized further.
Index should have fields created on which you want your conditions/actions to be based on.
Right now it is as good as searching a text document. There is no way to make sure that the verbiage of the logs will not change causing visualization to be inaccurate.

Related

NetSuite System Notes CASE formula returning all notes

I've added a formula(date/time) column to a saved search in NetSuite, to return a system notes' date.
My CASE formula is returning all the system notes row's, and I would like a specific row's date i.e. 'POP Host Int ID' date.
How can I specify the row to return the date from, or remove the rows with no date that are not relevant?
CASE
WHEN {systemnotes.field} = 'POP Host Int ID' AND {systemnotes.type} = 'Set'
THEN {systemnotes.date}
ELSE NULL
END
It appears that my WHEN logic works to identify the record's system notes do contain an entry for 'POP Host Int ID' but in THEN I'm not specifying which row to get the date from so it returns all rows. And I could be wrong on this part.
Example results
Example System Notes for 1 record
Thank you for your assistance.
The CASE statement doesn't determine which rows are returned, only what data is returned for that field. On the other hand, the reference to the systemnotes table creates a join that causes each record result to be repeated for every system note entry.
To avoid this, add {systemnotes.field} = 'POP Host Int ID' and {systemnotes.type} = 'Set' as Filters in the Criteria tab instead of in the WHEN conditions. You can then just add the field under results instead of needing a formula.
Edit in response to comment below:
In cases where you need one result per base record (user), but they don't all have valid values from the joined table (system notes), I'd suggest grouping the results by user, and using aggregation functions for all the columns. EG: For the column in question I'm assuming you are getting one valid result and a lot of blanks per user. If you group by user and set the Summarize function to MAX, you should just get one result where the valid value is returned. If no valid value exists from the system notes, you would still get a result from the user and that field will be blank.
If you are creating a saved search the place to do this is in the criteria section.
The views you've shared are for the System Notes pertaining to a single record.
For those views you could just use the Field selector in the Filters section to select your POP Host Ing ID field.
For a saved search you would use the Advanced view and scroll down the criteria field list. Near the bottom are the System Notes. You can filter on Field, Date etc

Count and other calculations on displayed records only

I am trying to display counts (and other formulas) for only the records being displayed.
When I put count #Field in the report (wherever I put it) I get too many records. I have no suppression formulas present.
I do have formulas in Select Expert, Record. However, I understood that counts should work after these formulas have been applied.
The total number of records showing at the bottom of the report is 799999. When I use count #Field I also get 799999. However, when I export information in Details into excel I get 28140. This is the number of rows of data displayed and what I need to get count etc on.
I have looked at numerous posts re "whileprintingrecords" and "runningtotals" but cannot seem to get anything to work and not sure what I need to do and where?
Thanks
Ian
In your page footer section place text field and there you can place special field
and using that "record number" in page footer you can access number of records until that page.
So on page 1 there could be
Record 5 of 799999
on page 2
Record 12 of 799999
etc...

graphite or grafana, rename IDs to String in the series

I've a data series that contains ID of the users. I can print the chart for 1,2,3 where the number are the IDs of the user. Now, i've in a file the name of the users and their IDs, thus 1=Alice, 2=Bob etc.
Is there a way to rename the series such that the chart show Alice or Bob instead of numbers?
Note that I user *, I've a data series of this type request. where as USER-ID i put * and graphite+grafana shows the 3 charts, one for each USER-ID.
This is what I get, and I would like to have for each series the name of the user instead of the ID (which is half covered for security)

MS Access 2010, Distinct in a Report?

I have a report that is based on a query of diagnoses (for example diabetes). The report returns a list of patients with that diagnosis. The problem is if john Q has diabetes xyz and diabetes 123, so if I run the report to give me a list of everyone with diabetes it will retun his name twice. I really don't want to change the particular query that this based on, I just want distinct name in the report. Is there a way to use distinct for a report or any other way of limiting the names to just once in the report? Or am I going to have to write a distinct query just for this report?
either edit the query by changing SELECT to
SELECT DISTINCT
or set the report to use grouping, you can Group by Name (or more likely, by a patient ID so two people with the same name don't get combined) - it's as described here
if you exclude listing the types of diabetes you will get each person on one line, if you include the types of diabetes you will get each person's details used as a heading with the types of diabetes indented
If the report already exists you can edit it by using the Grouping and Sorting option https://support.office.com/en-za/article/Create-a-grouped-or-summary-report-6a58e9ab-9f74-4689-83b6-c63cddb2c7f9?ui=en-US&rs=en-ZA&ad=ZA#__migbm_0

Categorizing MailMerge on ONE Page - Directory/Catalogue

I am trying to get the mail merge work with directory as the source that would help me categorize the records in my current template.
I am using this field code: {QUOTE{IF{MERGESEQ}=1{SET Key ""}}"{IF{MERGEFIELD Description}<> {KEY}"{IF{MERGESEQ}>1"
"}
Values for {MERGEFIELD Description}{SET Key{MERGEFIELD Description}}
Input
"}{MERGEFIELD ColDesc}
"}
Now the output I get is fine for a new fresh document, but when I try this code with an existing template, what it outputs is a document for each record it merges.
What I would like to have is a kind of this output on one page:
Details for the record selected from the file provided:
Values for 'Subjects'
Input
Study ID
Class ID
Subject Name
Student ID
Values for 'Visits'
Input
Visit ID
Visit date
Room No.
Summary
etc.....
But what my output is the following:
Details for the record selected from the file provided:
Values for 'Subjects'
Input
Study ID
Class ID
Subject Name
Student ID
Details for the record selected from the file provided:
Values for 'Visits'
Input
Visit ID
Visit date
Room No.
Summary
All suggestions are appreciated.
Best
Yes,
I was able to figure out my problem.
I followed this link http://windowssecrets.com/forums/showthread.php/111149-Mailmerge-Tutorial-Create-Sorted-Listings-(2000-2010)
and in that
The tutorial shows how to do the categorisation. From what I've described, it seems the field under the topic 'Merge Records By Category' would serve as the basis for the project. If you want to output some content only when the first record is merged, simply modify this part of the field:
{IF{MERGESEQ}= 1 {SET Key " "}}
to, for example:
{IF{MERGESEQ}= 1 "{SET Key " "}Record 1"}
Cool, SO far so good.

Resources