klugman 0.5.dev25

Creator: railscoder56

Last updated:

Add to Cart

Description:

klugman 0.5.dev25

klugman=======Python library and cmdline tools for accessing Quincy.Using Klugman as a client library:```from klugman import v1# NOTE: include version number in URL!events = v1.Events('http://www.example.com:8000/v1')data = events.get_events_count(name='compute.instance.update')streams = v1.Streams('http://www.example.com:8000/v1')data = streams.get_streams(state='completed', details=True)```Command-line Examples:```klugmanhttp://127.0.0.1streams−husage:klugmanurlstreams[−h][−−nametriggername][−−fromdatetime][−−todatetime][−−traitstraitlist][−−details][−−stateactive,firing,expiring,error,expireerror,completed,retryfire,retryexpire][−−count|−−idstreamid]optionalarguments:−h,−−helpshowthishelpmessageandexit−−nametriggernameReturnstreamsoftypetriggername.−−fromdatetimeReturnstreamslastupdatedafterdatetime−−todatetimeReturnstreamslastupdatedbeforedatetime−−traitstraitlistReturnstreamswithspecificdistinguishingtraits.−−detailsReturnfulleventdetails.−−stateactive,firing,expiring,error,expireerror,completed,retryfire,retryexpireOnlyreturnstreamsinthisstate.−−countReturnacountofstreamsmatchingfiltercriteria.−−idstreamidReturnasinglespecificstreambyid. klugman http://stacktach3-api01.example.com:8000 streams --count+----------+-------+| Property | Value |+----------+-------+| count | 44216 |+----------+-------+klugmanhttp://stacktach3−api01.example.com:8000streams−−count−−statecompleted+−−−−−−−−−−+−−−−−−−+|Property|Value|+−−−−−−−−−−+−−−−−−−+|count|42571|+−−−−−−−−−−+−−−−−−−+ klugman http://stacktach3-api01.example.com:8000 streams+---------+------------------+---------------------------------------------------------------------------------------------+| Section | Property | Value |+---------+------------------+---------------------------------------------------------------------------------------------+| Stream | id | 44171 || Stream | state | active || Stream | name | test_trigger || Stream | first_event | 2015-04-22 21:06:09.400561 || Stream | last_event | 2015-04-22 21:07:17.317974 || Stream | fire_timestamp | None || Stream | expire_timestamp | 2015-04-24 21:07:17.317974 || D.Trait | instance_id | 3ed27346-5906-4790-9b6e-e095e5b0cfa4 || D.Trait | timestamp | TimeRange from datetime.datetime(2015, 4, 22, 0, 0) to datetime.datetime(2015, 4, 23, 0, 0) |+---------+------------------+---------------------------------------------------------------------------------------------+klugmanhttp://stacktach3−api01.example.com:8000streams−−id44171−−detail+−−−−−−−−−+−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+|Section|Property|Value|+−−−−−−−−−+−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+|Stream|id|44171||Stream|state|active||Stream|name|testtrigger||Stream|firstevent|2015−04−2221:06:09.400561||Stream|lastevent|2015−04−2221:15:05.962515||Stream|firetimestamp|None||Stream|expiretimestamp|2015−04−2421:15:05.962515||D.Trait|instanceid|3ed12384−5906−4790−9b6e−e095e5b0cfa4||D.Trait|timestamp|TimeRangefromdatetime.datetime(2015,4,22,0,0)todatetime.datetime(2015,4,23,0,0)|+−−−−−−−−−+−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+Events:+−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+|Property|Value|+−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+|diskgb|40||displayname|myubuntu1404||ephemeralgb|0||eventtype|compute.instance.update||host|nova−api05.example.com||instanceflavor|1GBStandardInstance||instanceflavorid|3||instanceid|3ed23782−5906−4790−9b6e−e095e5b0cfa4||instancetype|1GBStandardInstance||memorymb|1024||messageid|a58e25ed−01f3−42d8−8979−5f1603ab2468||osarchitecture|x64||osdistro|com.ubuntu||osversion|14.04||requestid|req−758de1f9−03e9−4337−af7d−d9efe3efc730||rootgb|40||service|api||state|building||statedescription|scheduling||tenantid|1234||timestamp|2015−04−2221:06:09.400561||userid|4567||vcpus|1|+−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−++−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+|Property|Value|+−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+|diskgb|40||displayname|myubuntu1404||ephemeralgb|0||eventtype|compute.instance.update||host|c−88−77−44−2||instanceflavor|1GBStandardInstance||instanceflavorid|3||instanceid|3ed23782−5906−4790−9b6e−e095e5b0cfa4||instancetype|1GBStandardInstance||memorymb|1024||messageid|dbb6a5c0−08b8−45c8−85b4−a77b2b876bc3||osarchitecture|x64||osdistro|com.ubuntu||osversion|14.04||requestid|req−758de1f9−03e9−4337−af7d−d9efe3efc730||rootgb|40||service|None||state|building||statedescription|||tenantid|1234||timestamp|2015−04−2221:06:09.888688||userid|4567||vcpus|1|+−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+ klugman http://stacktach3-api01.example.com:8000 streams --traits instance_id:633fe23b-7c6a-dead-beef-55fcc6803cbc+---------+------------------+---------------------------------------------------------------------------------------------+| Section | Property | Value |+---------+------------------+---------------------------------------------------------------------------------------------+| Stream | id | 43993 || Stream | state | active || Stream | name | test_trigger || Stream | first_event | 2015-04-22 18:21:28.462931 || Stream | last_event | 2015-04-22 18:21:28.462931 || Stream | fire_timestamp | None || Stream | expire_timestamp | 2015-04-24 18:21:28.462931 || D.Trait | instance_id | 633fe23b-7c6a-dead-beef-55fcc6803cbc || D.Trait | timestamp | TimeRange from datetime.datetime(2015, 4, 22, 0, 0) to datetime.datetime(2015, 4, 23, 0, 0) |+---------+------------------+---------------------------------------------------------------------------------------------++---------+------------------+---------------------------------------------------------------------------------------------+| Section | Property | Value |+---------+------------------+---------------------------------------------------------------------------------------------+| Stream | id | 43992 || Stream | state | active || Stream | name | test_trigger || Stream | first_event | 2015-04-22 18:21:27.905027 || Stream | last_event | 2015-04-22 18:24:18.985118 || Stream | fire_timestamp | None || Stream | expire_timestamp | 2015-04-24 18:24:18.985118 || D.Trait | instance_id | 633fe23b-7c6a-dead-beef-55fcc6803cbc || D.Trait | timestamp | TimeRange from datetime.datetime(2015, 4, 22, 0, 0) to datetime.datetime(2015, 4, 23, 0, 0) |+---------+------------------+---------------------------------------------------------------------------------------------+klugmanhttp://stacktach3−api01.example.com:8000streams−−statecompleted+−−−−−−−−−+−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+|Section|Property|Value|+−−−−−−−−−+−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+|Stream|id|43498||Stream|state|completed||Stream|name|testtrigger||Stream|firstevent|2015−04−2000:00:18.740466||Stream|lastevent|2015−04−2000:00:18.740466||Stream|firetimestamp|2015−04−2211:53:37.441695||Stream|expiretimestamp|2015−04−2200:00:18.740466||D.Trait|instanceid|7080633a−ffa3−dead−beef−d1549b4ac049||D.Trait|timestamp|TimeRangefromdatetime.datetime(2015,4,19,0,0)todatetime.datetime(2015,4,20,0,0)|+−−−−−−−−−+−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+ klugman http://127.0.0.1 events -husage: klugman url events [-h] [--name event_name] [--from datetime][--to datetime] [--traits trait_list][--count | --msg_id message_id]optional arguments:-h, --help show this help message and exit--name event_name Return events of type event_name.--from datetime Return events generated before datetime--to datetime Return events generated after datetime--traits trait_list Return events with specific traits.--count Return a count of events matching filter criteria.--msg_id message_id Return a single specific event by message id.klugmanhttp://stacktach3−api01.example.com:8000events+−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+|Property|Value|+−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+|mark|6544b||diskgb|80||displayname|MyDisplayName||ephemeralgb|0||eventtype|compute.instance.update||host|c−11−22−33−4||instanceflavor|2GBStandardInstance||instanceflavorid|4||instanceid|85240caf−71cf−dead−beef−6735298e6090||instancetype|2GBStandardInstance||memorymb|2048||messageid|c49d08be−dae5−4740−8f04−fb4cc27ac2fa||osarchitecture|x64||osdistro|org.centos||osversion|7||requestid|req−16b4995e−8a14−4b25−bd1c−ba68e82773f7||rootgb|80||service|None||state|building||statedescription|spawning||tenantid|725||timestamp|2015−04−2221:43:29.940846||userid|945||vcpus|2|+−−−−−−−−−−−−−−−−−−−−+−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−+ klugman http://stacktach3-api01.example.com:8000 events --name compute.instance.create.end+--------------------+------------------------------------------+| Property | Value |+--------------------+------------------------------------------+| _mark | 6547e || disk_gb | 80 || display_name | My_Display_Name || ephemeral_gb | 0 || event_type | compute.instance.create.end || host | c-11-22-33-4 || instance_flavor | 2GB Standard Instance || instance_flavor_id | 4 || instance_id | 0c30d4be-409d-dead-beef-6d8a3744e80f || instance_type | 2GB Standard Instance || launched_at | 2015-04-22 21:46:04 || memory_mb | 2048 || message | Success || message_id | 51bd735f-9817-4940-9826-5b057bf51f70 || os_architecture | x64 || os_distro | com.microsoft.server || os_version | 2012.0 || rax_options | 4 || request_id | req-108e129d-49fd-1213-8e93-3f5595fd4d6c || root_gb | 80 || service | compute || state | active || state_description | || tenant_id | 3334 || timestamp | 2015-04-22 21:46:05.066171 || user_id | 3848 || vcpus | 2 |+--------------------+------------------------------------------+klugmanhttp://stacktach3−api01.example.com:8000events−−namecompute.instance.create.end−−count+−−−−−−−−−−+−−−−−−−+|Property|Value|+−−−−−−−−−−+−−−−−−−+|count|10280|+−−−−−−−−−−+−−−−−−−+ klugman http://stacktach3-api01.example.com:8000 events --msg_id 047d9d5c-9190-4b85-9963-35d4cd095d07+--------------------+------------------------------------------+| Property | Value |+--------------------+------------------------------------------+| disk_gb | 80 || display_name | My_Display_Name || ephemeral_gb | 0 || event_type | compute.instance.create.end || host | c-11-22-33-4 || instance_flavor | 2GB Standard Instance || instance_flavor_id | 4 || instance_id | b3c1be31-0ebe-4d6d-9663-b617eabac421 || instance_type | 2GB Standard Instance || launched_at | 2015-04-22 18:02:03 || memory_mb | 2048 || message | Success || message_id | 047d9d5c-9190-4b85-9963-35d4cd095d07 || os_architecture | x64 || os_distro | org.debian || os_version | 7 || rax_options | 0 || request_id | req-597b08a3-faef-425a-8f63-b91abcb1e1dd || root_gb | 80 || service | compute || state | active || tenant_id | 3334 || timestamp | 2015-04-22 21:46:05.066171 || user_id | 3848 || vcpus | 2 |+--------------------+------------------------------------------+```

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.