Open TraGicCode opened 5 years ago
EndPoint:
curl http://<baseurl>:33333/api/messages/search/CreateOrder?page=1&per_page=20 | python -m json.tool
Description:
Ability to query for messages that contain a certain keyword like Order or CreateOrder etc.
http://<baseurl>:33333/api/messages/search/CreateOrder?page=1&per_page=20
Endpoint:
curl http://<baseurl>:33333/api/errors?page=1&per_page=1000 | python -m json.tool
Description:
Ability to query error messages i think waiting to be handled??? not really sure it might actually be all error messages that have happened and will eventually be purged off.
Get Example Data later
Valid Values for Attributes: status = unresolved/archived/retryissued sort = time_of_failure
Endpoint:
curl http://<baseurl>:33333/api/configuration | python -m json.tool
Description:
Ability to get servicecontrol configuration
{
"data_retention": {
"audit_retention_period": "30.00:00:00",
"error_retention_period": "15.00:00:00"
},
"host": {
"logging": {
"log_path": "C:\\ProgramData\\Particular\\ServiceControl\\Particular.ServiceControl.prod\\Logs",
"logging_level": "Warn",
"raven_db_log_level": "Warn"
},
"raven_db_path": "C:\\ProgramData\\Particular\\ServiceControl\\Particular.ServiceControl.prod\\DB",
"service_name": "Particular.ServiceControl.prod"
},
"performance_tunning": {
"expiration_process_batch_size": 65512,
"expiration_process_timer_in_seconds": 600,
"external_integrations_dispatching_batch_size": 100,
"http_default_connection_limit": 100,
"max_body_size_to_store": 102400
},
"plugins": {
"heartbeat_grace_period": "00:00:40"
},
"transport": {
"audit_log_queue": "audit.forwarding.prod",
"audit_queue": "audit",
"error_log_queue": "error.forwarding.prod",
"error_queue": "error",
"forward_audit_messages": true,
"forward_error_messages": false,
"transport_type": "NServiceBus.RabbitMQTransport, NServiceBus.Transports.RabbitMQ"
}
}
Endpoint:
curl http://<baseurl>:33333/api/endpoints/{name}/messages/{?page,per_page,direction,sort}
Description:
Contains all messages for an endpoint along with headers, link to the body of the message, and way more. Also indicates if the message was successful
[
{
"body_size": 2343,
"body_url": "/messages/f9038263-51ee-42cb-8c93-a9a500336bad/body?instance_id=aHR0cDovL3NlcnZpY2Vjb250cm9sLXByb2QuYmxpbmRzLmNvbTozMzMzMy9hcGk.",
"conversation_id": "949a86ca-2bb2-46a8-8186-a9a400336b24",
"critical_time": "00:00:00.2744240",
"delivery_time": "00:00:00.2744240",
"headers": [
{
"key": "NServiceBus.MessageId",
"value": "f9038263-51ee-42cb-8c93-a9a500336bad"
},
{
"key": "NServiceBus.CorrelationId",
"value": "f9038263-51ee-42cb-8c93-a9a500336bad"
},
{
"key": "NServiceBus.MessageIntent",
"value": "Publish"
},
{
"key": "NServiceBus.Version",
"value": "5.2.14"
},
{
"key": "NServiceBus.TimeSent",
"value": "2018-11-27 03:07:13:002654 Z"
},
{
"key": "NServiceBus.ContentType",
"value": "application/json"
},
{
"key": "NServiceBus.EnclosedMessageTypes",
"value": "xx.Ordering.Contracts.Events.xx, xx.xx.Contracts.Events, Version=67.2018.10.29183, Culture=neutral, PublicKeyToken=null;xx.Ordering.xx.Events.V3.xx, xx.xx.Contracts.Events, Version=67.2018.10.29183, Culture=neutral, PublicKeyToken=null;xx.Ordering.Contracts.Events.V2.IPurchaseOrderCreated, xx.Ordering.Contracts.Events, Version=67.2018.10.29183, Culture=neutral, PublicKeyToken=null"
},
{
"key": "WinIdName",
"value": "tragiccode\\svc-user"
},
{
"key": "NServiceBus.RelatedTo",
"value": "9fb074ae-064a-49f6-9bb3-a9a400336e35"
},
{
"key": "NServiceBus.ConversationId",
"value": "949a86ca-2bb2-46a8-8186-a9a400336b24"
},
{
"key": "NServiceBus.RabbitMQ.CallbackQueue",
"value": "Soccer.Host.2-XX-ZM01"
},
{
"key": "NServiceBus.OriginatingMachine",
"value": "2-XX-ZM01"
},
{
"key": "NServiceBus.OriginatingEndpoint",
"value": "Baseball.Host"
},
{
"key": "NServiceBus.ReplyToAddress",
"value": "Soccer.Host"
},
{
"key": "NServiceBus.ProcessingStarted",
"value": "2018-11-27 03:07:13:277078 Z"
},
{
"key": "NServiceBus.ProcessingEnded",
"value": "2018-11-27 03:07:13:277078 Z"
},
{
"key": "NServiceBus.ProcessingMachine",
"value": "2-XX-ZM01"
},
{
"key": "NServiceBus.ProcessingEndpoint",
"value": "Soccer.Host"
},
{
"key": "NServiceBus.OriginatingAddress",
"value": "Baseball.Host@2-XX-ZM01"
}
],
"id": "b843006a-3997-b114-0735-6b56670b004f",
"instance_id": "aHR0cDovL3NlcnZpY2Vjb250cm9sLXByb2QuYmxpbmRzLmNvbTozMzMzMy9hcGk.",
"is_system_message": false,
"message_id": "f9038263-51ee-42cb-8c93-a9a500336bad",
"message_intent": "publish",
"message_type": "XX.FFF.Contracts.Events.XXX",
"processed_at": "2018-11-27T03:07:13.277078Z",
"processing_time": "00:00:00",
"receiving_endpoint": {
"host": "2-XX-ZM01",
"host_id": "0f3a0d10-1ff6-b850-17c8-1951c6ea24e7",
"name": "Baseball.Host"
},
"sending_endpoint": {
"host": "2-P1-APP01",
"host_id": "a753ed04-9212-624d-229f-8fa480a367da",
"name": "GG.FFF.Host"
},
"status": "successful",
"time_sent": "2018-11-27T03:07:13.002654Z"
},
EndPoint:
curl http://<baseurl>:33333/api/endpoints/Soccer.Host/errors
Description:
Error messages for a given host
Get data later
Endpoint:
curl http://<baseurl>:33333/api/customchecks?status=fail
Description:
View information on custom checks such as failures and passes etc.
{
"category": "ServiceControl Health",
"custom_check_id": "Audit Message Ingestion",
"failure_reason": "One or more audit messages have failed to import properly into ServiceControl and have been stored in the ServiceControl database.\r\nThe import of these messages could have failed for a number of reasons and ServiceControl is not able to automatically reimport them. For guidance on how to resolve this see https://docs.particular.net/servicecontrol/import-failed-audit-messages",
"id": "436b127d-1b79-339d-ea9c-8f5ec2fa47af",
"originating_endpoint": {
"host": "XXX-01",
"host_id": "c22a13b0-989a-0c81-625a-d7feac53a1b1",
"name": "Particular.ServiceControl.prod"
},
"reported_at": "2018-11-27T03:13:55.7986642Z",
"status": "fail"
},
{
"category": "ServiceControl Health",
"custom_check_id": "Error Message Ingestion",
"failure_reason": "One or more error messages have failed to import properly into ServiceControl and have been stored in the ServiceControl database.\r\nThe import of these messages could have failed for a number of reasons and ServiceControl is not able to automatically reimport them. For guidance on how to resolve this see https://docs.particular.net/servicecontrol/import-failed-audit-messages",
"id": "20e42db3-f204-1a5a-01ec-a71058eddf56",
"originating_endpoint": {
"host": "XXX-001",
"host_id": "c22a13b0-989a-0c81-625a-d7feac53a1b1",
"name": "Particular.ServiceControl.prod"
},
"reported_at": "2018-11-27T03:13:55.7986642Z",
"status": "fail"
},
{
"category": "3rd Party",
"custom_check_id": "EmailPeriodicCheck",
"id": "d5c9aa61-13f9-3f19-5c55-74819b464f98",
"originating_endpoint": {
"host": "AZ-XXX-AP002",
"host_id": "2b9ede3f-4fb9-5bde-35d6-578eb209ecbb",
"name": "XX.Soccer.Host"
},
"reported_at": "2018-11-27T03:17:31.6755793Z",
"status": "pass"
},
Valid Values for attributes:
status=fail/pass
The first thing that needs to happen before i can begin working on this addon is to perform some reconnaissance. I need to figure out what http endpoints can be used and what type of data can be collected.
Endpoint:
Description:
The endpoint that describes all other endpoints. This should be the complete master list of apis available.
Endpoint:
Description:
The endpoint shows information about your servicecontrol license.
Endpoint:
Description:
Valid Values for Attributes: reporting_status = beating/dead
Endpoint:
Description:
Need to find out the exact purpose of this compared to endpoints endpoint!