This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import logging | |
import requests | |
import sys | |
import time | |
from base64 import b64encode | |
logging.basicConfig(filename='sumo-search-job.log', level='INFO', format='%(asctime)s %(levelname)s: %(message)s') | |
logging.info('*************STARTING REQUEST*************') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$uri = "https://api.us2.sumologic.com/api/v1"; | |
$query = '{"query":"error | count _sourceCategory", "from":"2017-05-18T00:00:00", "to":"2017-05-18T00:15:00", "timeZone": "PST"}'; | |
$http_headers = array( | |
//replace with appropriate access id and access key | |
'Authorization: Basic '. base64_encode("SUMO_ACCESS_ID:SUMO_ACCESS_KEY"), | |
'Accept: application/json', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INPUT] | |
Name dummy | |
Tag dummy.log | |
[OUTPUT] | |
Name http | |
Match * | |
Host cloud.community.humio.com | |
Port 443 | |
URI /api/v1/ingest/raw |