Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tags to measurement definition #8

Closed
awlx opened this issue Aug 20, 2018 · 9 comments
Closed

Add Tags to measurement definition #8

awlx opened this issue Aug 20, 2018 · 9 comments
Assignees

Comments

@awlx
Copy link

awlx commented Aug 20, 2018

It would be really cool to have the Tags configurable when a measurement is created.

@keltia
Copy link
Owner

keltia commented Aug 20, 2018

My documentation may be misleading then because you can include/exclude tags already:

$ atlas -T ipv4 -N 10 ping 8.8.8.8
Measurements created:
15759778

Use the following command to retrieve results in JSON:

  atlas r 

$ atlas r 15759778 | jq .
[
  {
    "af": 4,
    "avg": 2.373305,
    "dst_addr": "8.8.8.8",
    "dst_name": "8.8.8.8",
    "dup": 0,
    "from": "46.182.41.95",
    "fw": 4940,
    "group_id": 15759778,
    "lts": 48,
    "max": 3.89673,
    "min": 1.61028,
    "msm_id": 15759778,
    "msm_name": "Ping",
    "prb_id": 12007,
    "proto": "ICMP",
    "rcvd": 3,
    "result": [
      {
        "rtt": 3.89673
      },
      {
        "rtt": 1.61028
      },
      {
        "rtt": 1.612905
      }
    ],
    "sent": 3,
    "size": 64,
    "src_addr": "192.168.31.153",
    "step": null,
    "stored_timestamp": 1534772351,
    "timestamp": 1534772337,
    "ttl": 121,
    "type": "ping"
  },
...

If you run it in debug mode with -D you see ipv4specified in the tags_include entry in the ProbeSet.

Are you talking of something else?

It was implemented around 2e43065.

@awlx
Copy link
Author

awlx commented Aug 21, 2018

We are talking about when creating a measurement it is possible to add a tag to it so it's easier to find.

curl --dump-header - -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{
"definitions": [
{
"target": "test.de",
"af": 4,
"packets": 3,
"size": 48,
"description": "Ping measurement to test.de",
"interval": 240,
"tags": [
"test-tag"
],
"resolve_on_probe": false,
"skip_dns_check": false,
"include_probe_id": false,
"type": "ping"
}
],
"probes": [
{
"type": "area",
"value": "WW",
"requested": 10
}
],
"is_oneoff": false,
}' https://atlas.ripe.net/api/v2/measurements//?key=YOUR_KEY_HERE

See the "test-tag" in the request :).

@keltia keltia self-assigned this Aug 21, 2018
@keltia
Copy link
Owner

keltia commented Aug 21, 2018

Right, not the include/exclude tags you can have for probesets. Adding this to the API is not really difficult, changing the UI on atlas a bit more.

@keltia
Copy link
Owner

keltia commented Aug 21, 2018

Done in v0.40 (API 0.5.0) in commit 5196456

See https://atlas.ripe.net/api/v2/measurements/15771119/ for an example.

Please try and comment :)

@awlx
Copy link
Author

awlx commented Aug 22, 2018

screen shot 2018-08-22 at 07 20 01
Perfect! Works like a charm :). Thank you very much!

Is it also possible to add the --tags Flag to the measurement search function? It would be really awesome, so we could add new measurements already tagged with all flags we want and afterwards just pull the results.

API docs for this:
https://atlas.ripe.net/docs/api/v2/manual/measurements/measurement-tags.html

 NAME:
   atlas measurements list - lists all measurements

USAGE:
   atlas measurements list [command options] [arguments...]

DESCRIPTION:
   displays all measurements

OPTIONS:
   --country value, -c value  filter on country
   --asn value                filter on asn
   -A, --all                  all measurements even inactive ones
   --is-anchor                select anchor measurements
   -t value, --type value     filter on measurement type

@keltia
Copy link
Owner

keltia commented Aug 22, 2018

OK, that is two things, first searching for a specific lset of tags and the tags calls. I'll open an issue for the latter and work first on the former :)

@keltia
Copy link
Owner

keltia commented Aug 22, 2018

Searching on tags is now in v0.41, committed in 65abcea.

Enjoy!

@awlx
Copy link
Author

awlx commented Aug 22, 2018

Nice! Thank you so much.

This really helps me to finish my current automated measurements with Atlas project!

@keltia
Copy link
Owner

keltia commented Aug 22, 2018

Closing this then :)

@keltia keltia closed this as completed Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants