Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/ci-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ jobs:
run: ./test/stop_agent.sh
if: steps.start_agent.outcome == 'success'

# - name: Test
# env:
# SDC_MONITOR_TOKEN: ${{ secrets.STAGING_MONITOR_API_TOKEN }}
# SDC_SECURE_TOKEN: ${{ secrets.STAGING_SECURE_API_TOKEN }}
# run: |
# pipenv run mamba -f documentation
- name: Test in staging
env:
SDC_MONITOR_TOKEN: ${{ secrets.STAGING_MONITOR_API_TOKEN }}
SDC_SECURE_TOKEN: ${{ secrets.STAGING_SECURE_API_TOKEN }}
SDC_MONITOR_URL: "https://app-staging.sysdigcloud.com"
SDC_SECURE_URL: "https://secure-staging.sysdig.com"
run: |
pipenv run mamba -f documentation
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ doublex = "*"
doublex-expects = "*"
expects = "*"
sdcclient = {editable = true,path = "."}
flake8 = "*"

[packages]
requests = "*"
Expand Down
167 changes: 104 additions & 63 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions examples/add_notification_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
# Post a user event to Sysdig Cloud
#

import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))

from sdcclient import SdcClient

#
Expand Down
5 changes: 2 additions & 3 deletions examples/add_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
# Add a new policy
#

import os
import sys
import json
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
import sys

from sdcclient import SdSecureClient


Expand Down
5 changes: 2 additions & 3 deletions examples/add_policy_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
# Add a new policy
#

import os
import sys
import json
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
import sys

from sdcclient import SdSecureClientV1


Expand Down
5 changes: 1 addition & 4 deletions examples/add_users_to_secure.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
# of the Secure Operations team as well.
#

import os
import sys
import json
import logging
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))

from sdcclient import SdcClient

#
Expand Down
9 changes: 5 additions & 4 deletions examples/create_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
#

import getopt
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))

from sdcclient import SdcClient


Expand Down Expand Up @@ -68,8 +67,10 @@ def usage():
60, # The alert will fire if the condition is met for at least 60 seconds.
'avg(cpu.used.percent) > 80', # The condition.
['host.mac', 'proc.name'], # Segmentation. We want to check this metric for every process on every machine.
'ANY', # in case there is more than one tomcat process, this alert will fire when a single one of them crosses the 80% threshold.
'proc.name = "tomcat"', # Filter. We want to receive a notification only if the name of the process meeting the condition is 'tomcat'.
'ANY',
# in case there is more than one tomcat process, this alert will fire when a single one of them crosses the 80% threshold.
'proc.name = "tomcat"',
# Filter. We want to receive a notification only if the name of the process meeting the condition is 'tomcat'.
notification_channel_ids,
False) # This alert will be disabled when it's created.

Expand Down
3 changes: 1 addition & 2 deletions examples/create_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
#

import getopt
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))

from sdcclient import SdMonitorClient


Expand Down
5 changes: 2 additions & 3 deletions examples/create_default_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
# policies created.
#

import os
import sys
import json
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..'))
import sys

from sdcclient import SdSecureClient


Expand Down
Loading