cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1641
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
VIP Alumni
VIP Alumni

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
VIP Alumni
VIP Alumni

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: