cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Cisco Secure Email Support Community

Product Support Talos Support Cisco Support Reference + Current Release
Gateway Reputation Lookup Open a support case Secure Email Guided Setup
Gateway: 14.2.0-616
Cloud Gateway Email Status Portal Support & Downloads docs.ces.cisco.com
Email and Web Manager: 14.2.0-203
Email and Web Manager Web & Email Reputation Worldwide Contacts Product Naming Quick Reference
Reporting Plug-in: 1.1.0.136
Encryption Bug Search
Encryption Plug-in: 1.2.1.167
Cloud Mailbox Notification Service
Outlook Add-in(s): More info

1366
Views
0
Helpful
4
Replies

Searching for information with SNMP

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

 

 

View solution in original post

4 REPLIES 4
omz
Collaborator
Collaborator

Hello 

SNMP is dead :)

Why not use API -https://www.cisco.com/c/en/us/td/docs/security/esa/esa_all/esa_api/b_ESA_API_Getting_Started_Guide/b_ESA_API_Getting_Started_Guide_chapter_00.html#con_1092467

 

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"
}

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.

 

 

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.

 

 

omz
Collaborator
Collaborator

Or you can just use curl from mac or linux cli to get the data. 

Create
Recognize Your Peers
Content for Community-Ad