How to get delivery info on AWS SNS using Cloudwatch for Push Notification?

181 views
Skip to first unread message

HarisH

unread,
Nov 2, 2016, 8:13:42 AM11/2/16
to Fluentd Google Group
I am using Aws SNS to send notification, and sending notifications to different topics and is working perfectly.

When i `publish` notification, i got array like

    object(Aws\Result)#84 (1) {
    ["data":"Aws\Result":private]=>
    array(2) {
        ["MessageId"]=>
        string(36) "************-7a29-591f-8765-************"
        ["@metadata"]=>
        array(4) {
            ["statusCode"]=>
            int(200)
            ["effectiveUri"]=>
            string(40) "https://sns.ap-southeast-1.amazonaws.com"
            ["headers"]=>
        array(4) {
            ["x-amzn-requestid"]=>
            string(36) "************-b737-5831-abf4-************"
            ["content-type"]=>
            string(8) "text/xml"
            ["content-length"]=>
            string(3) "294"
            ["date"]=>
            string(29) "Fri, 28 Oct 2016 08:59:05 GMT"
        }
        ["transferStats"]=>
            array(1) {
                ["http"]=>
                array(1) {
                [0]=>
                   array(0) {}
                }
            }
        }
     }
    }


I am using php at server side,

But i need to generate a report for each topic separately, that which endpoints (subscriber of topic) get notification and whether notifications are failed, and what is the percentage of successful delivery.

After a lot of research, i found that Aws CloudWatch can do my work, i also searched on stackOverflow for this, and got this answer:

<http://stackoverflow.com/questions/19651315/how-to-confirm-delivery-status-when-using-amazonsns-mobile-push>

I also generated some log in CloudWatch,
By `describeLogGroups`, i am getting array like

    [logGroups] => Array(
    [0] => Array
        (
            [logGroupName] => sns/ap-southeast-1/************/app/GCM/AndroidN
            [creationTime] => ************
            [retentionInDays] => 30
            [metricFilterCount] => 0
            [arn] => arn:aws:logs:ap-southeast-1:************:log-group:sns/ap-southeast-1/************/app/GCM/AndroidN:*
            [storedBytes] => 3133
         )
     )

By `describeLogStreams`, i am getting array like


    [logStreams] => Array(
        [0] => Array
            (
                [logStreamName] => 25
                [creationTime] => 1477574852344
                [firstEventTimestamp] => 1477574831966
                [lastEventTimestamp] => 1477574831966
                [lastIngestionTime] => 1477574852374
                [uploadSequenceToken] => ***********************8
                [arn] => arn:aws:logs:ap-southeast-1:*********:log-group:sns/ap-southeast-1/**********/app/GCM/AndroidN:log-stream:25
                [storedBytes] => 627
            )
    )

but confused that how to access it for a particular topic, because in my website i create some topics for group of users (endpoints), and now i want to show for every topic how much notification sent/failed to endpoints not to topic,

Thanks in Anticipants.

Mr. Fiber

unread,
Nov 2, 2016, 8:39:02 AM11/2/16
to Fluentd Google Group
Is this fluentd question?


Masahiro

--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

HarisH

unread,
Nov 2, 2016, 8:46:14 AM11/2/16
to Fluentd Google Group
Yes!!

Mr. Fiber

unread,
Nov 2, 2016, 8:50:32 AM11/2/16
to Fluentd Google Group
Which point? Plugin?

--

HarisH

unread,
Nov 2, 2016, 8:52:58 AM11/2/16
to Fluentd Google Group
No, please read my question, u will know, what is my issue,


On Wednesday, November 2, 2016 at 5:43:42 PM UTC+5:30, HarisH wrote:

Mr. Fiber

unread,
Nov 2, 2016, 8:54:31 AM11/2/16
to Fluentd Google Group
Sorry, I can't understand which point is related to fluentd from your questions...

--

HarisH

unread,
Nov 2, 2016, 9:51:57 AM11/2/16
to Fluentd Google Group
My question is related to AWS SNS and cloudwatch,


On Wednesday, November 2, 2016 at 5:43:42 PM UTC+5:30, HarisH wrote:

Mr. Fiber

unread,
Nov 2, 2016, 10:11:26 AM11/2/16
to Fluentd Google Group
This is fluentd mailing list.
Don't post non-fluentd questions.


--
Reply all
Reply to author
Forward
0 new messages