Splunk viewing '_value' not using mcatalog - splunk

According to Splunk, | mcatalog values(_value) WHERE index=index-name is not allowed. Is there another way to view _value's for all the requests sent without using mcatalog?
P.S. i've looked into mstats but it only offers max, min, sum, etc...

If the metric you're looking for has a minute frequency you can use latest(_value) with mstats and a span of 1 minute. You will get the raw value recorded by that minute measurement.
| mstats latest(_value)
WHERE index=em_metrics metric_name="*" span=1m
BY metric_name
Notice how the raw value changes every minute:
If this fixes your problem, take a moment to accept the answer. This can be done by clicking on the check mark beside the answer to toggle it from greyed out to filled in!

Related

GA4: total revenue is 0 and Monetization screen not showing data

I'm trying to integrate ecommerce tracking to a website. The problem is the events are captured and I'm sending all the data.
This is the data I'm sending
{"event":"purchase","currency":"EUR","value":21.85,"items":[{"item_id":"3cd937-debc-416d-955f-8ccc84a751","item_name":"anuy-namer","affiliation":"","coupon":"","currency":"EUR","discount":0,"index":1,"item_brand":"Fontastic","item_category":"THeadset / Lautsprecher","item_category2":"Unterhaltungk - Körer","item_category3":"","item_category4":"","item_category5":"","item_list_id":"31baa491-4c6f-8671-c808f0cb2100","item_list_name":"Fontastic BT In-Ear Headset S1 blau Bluetooth-Kopfhörer","item_variant":"Mit Begleiterliche Musikfans.","location_id":"","price":14.95,"quantity":1}],"transaction_id":"9826314a-46af-4304-a057-dc77f4a799b0","affiliation":"446c6345-9193-4841-9f4a-e06e8cf7220e","tax":"3.4917","shipping":"6.9000","coupon":"","gtm.uniqueEventId":12}
tbh I'm not sure if the data is wrong but the monetization reports only show number of purchasers and not anything else. It's all zeros. in the conversion screen the total revenue is not calculated.
Check if you have been given permission to see revenue. When someone gives you access, there are several options including one to hide revenue.
It turned out that the setup wasn't correct. I needed to add custom trigger to the events so It can be captured.
I also found some problem with the structure of the object, (currency,value , items) needed to be added inside ecommerce object.

ffmpeg - How to replace / overwrite part of audio from given timestamp on?

I am using ffmpeg-kit to manage audio recordings in React Native.
I have 2 recordings - rec_1.m4a and rec_2.m4a.
I only know the duration of rec_1.m4a, which is 10.0 seconds.
I want to overwrite rec_1.m4a with rec_2.m4a from a specific timestamp on - e.g. from 5.6 seconds.
How can I do this with ffmpeg?
There are two special cases:
rec_2.m4a ends before rec_1.m4a does (in our case this means rec_2.m4a's duration is <4.4 seconds - 10.0-5.6=4.4).
rec_2.m4a does not end even after rec_1.m4a does (in our case this means rec_2.m4a's duration is >=4.4 seconds).
I know I could split the files and then concatenate them. But for that I would have to know rec_2.m4a's duration, which I don't.
Edit: Figured I could use the FFprobeKit.getMediaInformationAsync() function to easily get the duration of rec_2.m4a. But it would still be nice to know if replacement is possible without this extra step.

Fetch all events for the next 24 hours, including current events in the Office365 API

I'm using the following API call to fetch all events for the next 24h. The thing is, this doesn't return events that are currently active. Lets say an event started on 2018-08-01T13:00:00.000Z, this event isn't returned.
https://graph.microsoft.com/v1.0/users/me/calendars/<KEY>=/calendarView?startDateTime=2018-08-01T13:17:29.233Z&endDateTime=2018-08-02T13:17:29.233Z&orderby=start/dateTime&top=5
Now I know I can decrease the startTime to some hours before the current date/time and manually filter out all the old items except current ones, but what If an event takes a day, multiple days or a week? I would like Office365 to only return the items I need, so that is including the currently active items.
I can't find anything in the Office365 API documentation that points me in the right direction nor something that could lead to a workaround. Does anyone know how to fetch the current events as well but using the current date/time as "start date"?
https://learn.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/calendar-rest-operations
https://learn.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/complex-types-for-mail-contacts-calendar#event
I found out how to do is with some help from Microsoft. I now use https://graph.microsoft.com/v1.0/users/me/calendars//events with a $filter property containing the following:
Start/DateTime le '<current date/time>' and End/DateTime gt '<current date/time>' or Start/DateTime gt '<current date/time>'
This returns current events as well as future events.

How to search a given time range for every day in Splunk?

I am trying to search for an event that happens in a specific time range in Splunk but I want that search to encompass all of the data I have indexed which covers a wide date range.
For example, I want to see if a line in an indexed log file contains the word 'Error' between the hours of 9am and 4pm from the 25 days worth of logs I have indexed. If the word 'Error' shows up outside of that time range, I don't want that displayed in my search results.
For date/time format I am using mm/dd/yyyy:hh:mm:ss
Any ideas how I might go about this?
You can try a search something like this:
index=foo earliest=-25d (date_hour > 9 and date_hour < 16) "Error"
while the selected answer is great, it did not work in my case (splunk v6), however this did work (it was mainly adding the | eval date_hour... )
and my full working search (between hours of 6am to 11pm , for each of the prior 25 days):
index=mymts earliest=-25d | eval date_hour=strftime(_time, "%H") | search date_hour>=6 date_hour<=23 host="172.17.172.1" "/netmap/*"
hope this helps others.

Obtain Deviantart Deviation ID / UUID from page URL

I was looking at the Deviantart API to see what you can do with it .
A lot of requests require you to provide a deviation id to work with.
Take for instance adding a deviation to favorites ( in Collections -> Add deviation to favorites above, I cannot post more than 2 links... )
Now I looked through the API to figure out how to obtain that id, but I did not find out how to do so.
If I only have the deviation URL, for instance http://kennyklent.deviantart.com/art/Pinkie-Pie-Dancing-296143815 , how can I tell its deviation-id?
It is not the number at the end 296143815, I would've thought so, but it's not.
If it helps, here's one example from the api's /browse/dailydeviations endpoint
"deviationid": "27FD366A-30CB-FC3E-DE54-9621E90FCE60",
"printid": "E984FC87-8B57-239C-FE7C-E2674A0DDFC4",
"url": "http://mudimba.deviantart.com/art/SF-Botanical-Gardens-57879397",
So this deviation SF-Botanical-Gardens-57879397 has the id 27FD366A-30CB-FC3E-DE54-9621E90FCE60 - but how would I find out if it wasn't listed in the examples?
Update 06/2017:
For anyone stumbling across this 2 years later, the answer below still works but there is now another way to get the UUID. Every Deviation now has a meta property da:appurl showing the UUID value on the deviation page itself.
To stay with the SF-Botanical-Gardens-57879397 example from above, looking at the page source at http://mudimba.deviantart.com/art/SF-Botanical-Gardens-57879397 reveals:
<meta property="da:appurl" content="DeviantArt://deviation/27FD366A-30CB-FC3E-DE54-9621E90FCE60">
Which contains exactly the UUID value 27FD366A-30CB-FC3E-DE54-9621E90FCE60
Original answer
I got an answer from a Deviantart dev directly, http://comments.deviantart.com/1/492518964/3755610860
You cannot convert integer IDs into UUID format, you have to query the api to find the correct uuid. So for your example, you would query the /gallery/folders endpoint and then the gallery/{folderid} endpoint to get the list of deviations in that folder.
There's no easier way to obtain the UUID for a given URL for now.