this is my /opt/graphite/statsd/local.js
{
graphitePort: 2003
, graphiteHost: "127.0.0.1"
, port: 8125
, backends: [ "./backends/graphite", "./backends/repeater" ]
, repeater: [ { host: '10.1.2.16', port: 8125 } ]
, graphite: { legacyNamespace: false, globalPrefix: "testing_server_1" }
, flushInterval: 600
}
as you can see that i am sending the server name by setting the globalPrefix as "testing_server_1", and set the legacyNamespace to false, so i get two graph like
testing_server_1.counters.core_network_bad_soap.rate
and
testing_server_1.counters.core_network_bad_soap.count
but when i don't set legacyNamespace and globalPrefix i get one graph only
counters.core_network_bad_soap
my question is why it is so and secondly, how to set site name along with server name.
Q. when i don't set legacyNamespace and globalPrefix i get one graph only
The legacy namespacing sent just a counter. The updated namespace auto-generates rate and count. Here, count is the standard orthodox counter that you're looking for, and rate is the number of updates of that counter per unit interval.
Q. why it is so and secondly, how to set site name along with server name.
Say you have three servers each running two sites and you want the prefixing to be automated. What you can do is-
Make each server send metrics to its local statsd instance which prepends the current server name and site name (think of this as $this->server_name) to all the metrics.
You can write application-wrappers/libraries that do this. This way, you do not need to have countless statsd instances as you scale up. The applications will recieve metrics and dynamically prepend the site/server name and then forward it to the statsd.
Related
The documentation for the GA4 measurement protocol only describes sending events, and notes that the key events for measuring session duration etc. are reserved (automatically provided by gtag/firebase).
I'm attempting to use the measurement protocol in a .NET desktop environment (not firebase/web/android/ios). Sending events works as expected (they show up on the dashboard), but the user count always shows as zero. Sending a session_started event to the debug endpoint does not pass validation (states that it is a reserved event name).
Is it possible to manually send the events required to track sessions or is there another way to get an accurate user count without using firebase/gtag?
Protocol reference: https://developers.google.com/analytics/devguides/collection/protocol/ga4
You need to include the 'engagement_time_msec' parameter with a value of '1', e.g.:
{
"client_id": "XXXXXXXXXXXX",
"timestamp_micros": 1655281222643640,
"events": [
{
"name": "page_view",
"params": {
"page_location": "https://test.com",
"page_title": "Home Page",
"engagement_time_msec": 1
}
}
]
}
This was answered here: https://stackoverflow.com/a/71482548/7205473
I've been attempting to log activity on a mobile-like device using the Google Analytics Measurement Protocol. All of these attempts have validated using the validation URL, and I can see activity when I look at the real-time reports on the Analytics website. But when I look at the Home or Overview reports for the day - no activity is shown.
The view is set for "All Mobile App Data".
The POST body looks something like this:
v=1&tid=UA-000000000-1&ds=app&qt=1601&uid=uid-zzzzz&t=screenview&cd=Foo&an=Foo%20App%20Name&aid=com.example.foo&aiid=com.example.foo&av=0.0.1&ua=Mozilla%2F5.0%20(Linux%3B%20Android%207.0%3B%20SM-G930V%20Build%2FNRD90M)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F59.0.3071.125%20Mobile%20Safari%2F537.36
The ua field is just a pre-defined string. I found that if I omitted it, the Real Time monitoring listed the hits as desktop hits, although I was in a Mobile report and the ds field was "app".
Am I missing a field that is required? Is there some reason why it is showing up in the real-time report, but not in a daily report? Is there some other way to diagnose why the data is vanishing, or confirm the data is actually being captured?
When i check the debug endpoint the hit is valid
Request:
https://www.google-analytics.com/debug/collect?v=1&tid=UA-XXX-1&ds=app&qt=1601&uid=uid-zzzzz&t=screenview&cd=Foo&an=Foo%20App%20Name&aid=com.example.foo&aiid=com.example.foo&av=0.0.1&ua=Mozilla%2F5.0%20(Linux%3B%20Android%207.0%3B%20SM-G930V%20Build%2FNRD90M)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F59.0.3071.125%20Mobile%20Safari%2F537.36
Response
{
"hitParsingResult": [ {
"valid": true,
"parserMessage": [ ],
"hit": "/debug/collect?v=1\u0026tid=UA-53766825-1\u0026ds=app\u0026qt=1601\u0026uid=uid-zzzzz\u0026t=screenview\u0026cd=Foo\u0026an=Foo%20App%20Name\u0026aid=com.example.foo\u0026aiid=com.example.foo\u0026av=0.0.1\u0026ua=Mozilla%2F5.0%20(Linux%3B%20Android%207.0%3B%20SM-G930V%20Build%2FNRD90M)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F59.0.3071.125%20Mobile%20Safari%2F537.36"
} ],
"parserMessage": [ {
"messageType": "INFO",
"description": "Found 1 hit in the request."
} ]
}
I cannot use one of the mobile libraries from Firebase - this is not one of the platforms they support. I do not wish to pretend this is a web page - there is no associated hostname or path. I do not wish to use Events since I can't do event Behavior Flow, which is one of the things I'm interested in seeing.
I'm aware that it can sometimes take "a day or so" for results to first appear. The site was setup over five days ago at this point, and has received data during that time.
Good thought about the anti-spam setting, however the setting appears to be correct:
I've also tried using GET instead of POST - no change, it still shows the hit in real-time, but then it vanishes.
However, I know that it can record hits permanently. There were two hits from a spammer in Russia that have shown up in the daily report (I wasn't there to see it show up in real-time). I don't know what they did, but would love to find out since it might help figure out how I can add a record.
In the real-time reports, it correctly points out the data center all the hits are coming from. Perhaps that is filtering it out somewhere out of my control?
Try adding Cid I know it says this is an optional parameter but for mobile accounts I belive it may be required.
Client ID
Optional.
This field is required if User ID (uid) is not specified in the request. This anonymously identifies a particular user, device, or browser instance. For the web, this is generally stored as a first-party cookie with a two-year expiration. For mobile apps, this is randomly generated for each particular instance of an application install. The value of this field should be a random UUID (version 4) as described in http://www.ietf.org/rfc/rfc4122.txt.
Example value: 35009a79-1a05-49d7-b876-2b884d0f825b
Although this says it needs to be a UUIDv4, it does work with other UUIDs (I've tested it with a v5, which is a hash against the value used for the uid parameter).
We are using Gatling with a very simple scenario: reading urls from a CSV file and invoking them.
We get a throughput of ~18K requests/secs .
Are there any ideas of how to push this number up?
We tried putting the Keep-Alive header in order to refrain from the overhead of open/close of connections, but it doesn't help.
Here's our code:
class MySimulation extends Simulation {
val httpProtocol = http
.baseURL("http://localhost:9090/")
val csvFeeder = csv("uniq_urls_500.csv").random
val scn = scenario("MySimulation")
.feed(csvFeeder)
.repeat(10000) {
exec(http("request_0")
.get("?loc=${Url}")
.header("Keep-Alive", "1500000")
)
}
setUp(scn.inject(
rampUsers(100) over(5 seconds)
)).protocols(httpProtocol)
}
Increase the number of users for your test scenario from 100 to a higher number to increase load on your server.
Ensure your box from where you running gatling test can handle that much.
If the box is struggling then you can execute gatling from multiple boxes.
So I have a basic
$.ajax( { url : 'MyController/MyAction',
method : 'POST',
async: true,
.
. } );
that can be called very frequently as it is event-driven. Like it may be called 50 times in 1 second if the user is being obnoxious. It updates values in the database.
My friend told me that it's possible that the updates may be sent to the database in the wrong order. Is this true? This is causing me major cognitive dissonance and I can't sleep tonight.
I should mention that these values being updates in the database are associated with a user. In particular, the data is like
data : { userId : '21EC2020-3AEA-4069-A2DD-08002B30309D',
answerId : '69',
val : 'd' }
where the only values changing in rapid succession are answerId and val.
Unfortunately, my understand is "YES. The order is not guaranteed".
You send http request 50 times in 1 second and server save it to DB.
When the network is good and server is strong, it is okay to be saved to DB in order.
But if http sever is busy or network is interrupted, it does not guarantee the data will still always ordered in real happened sequence. Ex, 1 or 2 data order will be exchanged in DB.
My suggestion is : if the order is very critical and the update traffic is heavy, you should add a happen time in http data and save it to DB.
When you select data from DB, you can order by the happen time and it will make sure it has the correct order as event happens to avoid the mis-order caused by server or network busy.
I have two different receive ports and two receive locations - one location assigned to each port. The ports are set to receive the exact same type of file - I ended up with both because I consolidated two different applications that did the same thing.
I want to combine both locations into a single receive port, but I don't seem to be able to change the location that either belongs to - there's no option to do this that I can find. Essentially, I just want to take one location (either - I don't care), and assign it to the other port, so that one port has two locations and the other has none.
Does somebody know of a way to change the receive port of an existing location?
I resorted to the dark side, and updated the SQL table manually. I'd still welcome anybody who has a legitimate, supported way to do this, but to any others who need an answer, here's the script I wrote to fix this problem (no side-effects so far, though it's only been a day):
DECLARE #AppName VARCHAR(255),
#ReceiveLocationName VARCHAR(255),
#NewReceivePortName VARCHAR(255)
SET #AppName = 'Your application name'
SET #ReceiveLocationName = 'Name of your existing receive location'
SET #NewReceivePortName = 'Name of receive port to move location to'
DECLARE #NewPortID INT
DECLARE #ReceiveLocationID INT
SELECT #NewPortID = rp.[nID]
FROM [BizTalkMgmtDb].[dbo].[bts_application] a
JOIN [BizTalkMgmtDb].[dbo].[bts_receiveport] rp
ON a.nID = rp.nApplicationID
WHERE a.nvcName = #AppName
AND rp.nvcName = #NewReceivePortName
SELECT #ReceiveLocationID = Id
FROM [BizTalkMgmtDb].[dbo].[adm_receivelocation]
WHERE Name = #ReceiveLocationName
UPDATE [BizTalkMgmtDb].[dbo].[adm_receivelocation]
SET ReceivePortId = #NewPortID,
IsPrimary = 0
WHERE Id = #ReceiveLocationID
Please do not attempt such direct SQL changes in BizTalk system databases. You always use the API's provided by Microsoft.
Try either the ExplorerOM or WMI to do any such configuration changes.
http://msdn.microsoft.com/en-us/library/microsoft.biztalk.explorerom.receiveport_members(v=bts.10)
http://msdn.microsoft.com/en-us/library/ee277482(v=bts.10).aspx
If in case you make direct DB changes and raise Microsoft support, they won't support it.