06-15-2019 10:53 AM
Hello,
I am creating an IronPrt monitoring script using SNMP. Is it possible to collect the following information with SNMP?
Received Email Accuracy
Number of emails sent
Quarantined Email
Emails with detected virus
Blocked emails
SPAM
This information needs to be resolved in the last hour and day total.
So far I can collect the amount of e-mail in the queue with code 1.3.6.1.4.1.15497.1.1.1.11.0
Solved! Go to Solution.
06-15-2019 03:10 PM
If you just need the data the easiest way would be to use the Postman app.
https://learning.getpostman.com/docs/postman/sending_api_requests/requests/
Python can be used to write a script that will query the API and output can be formatted how you want.
There are loads of API query labs on Cisco DevNet using Postman and Python. If you are interested I would highly encourage to have a go at one of the labs on querying API. There various labs with different products like DNA, ACI Sandbox, Meraki .. it will give you a good understanding and you will find the code to get you started.
06-15-2019 11:01 AM
Hello
SNMP is dead :)
Sample Request GET /api/v1.0/stats/mail_incoming_traffic_summary?1d HTTP/1.0 User-Agent: curl/7.30.0 Host: mail.example.com:8080 Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ= Accept: application/json Sample Response HTTP/1.0 200 OK Server: EmailAPI/1.0 Date: Tue, 15 Jul 2014 08:26:46 GMT Content-type: application/json Content-Length: 461 Connection: close { "verif_decrypt_success": 0, "detected_virus": 99, "total_threat_recipients": 102, "threat_content_filter": 0, "total_recipients": 102, "blocked_invalid_recipient": 0, "blocked_dmarc": 0, "marketing_mail": 0, "ims_spam_increment_over_case": 0, "detected_amp": 0, "total_graymail_recipients": 0, "social_mail": 0, "detected_spam": 0, "total_clean_recipients": 0, "verif_decrypt_fail": 0, "malicious_url": 0, "bulk_mail": 0, "blocked_reputation": 3 }, "uri":"/api/v1.0/stats/mail_incoming_traffic_summary?1d" }
06-15-2019 12:50 PM
fought for the return
I was studying about using the API, but I have some doubts. I already configured IronPort as described in manuel.
Could you tell me how the API works? Should I create a JSON code by example and use the cour to collect the data I need? Or do I do this via JS with node.js? I really can not understand that part.
06-15-2019 03:10 PM
If you just need the data the easiest way would be to use the Postman app.
https://learning.getpostman.com/docs/postman/sending_api_requests/requests/
Python can be used to write a script that will query the API and output can be formatted how you want.
There are loads of API query labs on Cisco DevNet using Postman and Python. If you are interested I would highly encourage to have a go at one of the labs on querying API. There various labs with different products like DNA, ACI Sandbox, Meraki .. it will give you a good understanding and you will find the code to get you started.
06-15-2019 03:11 PM
Or you can just use curl from mac or linux cli to get the data.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide