├── .dockerignore ├── .fossa.yml ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug---escalation-report.md │ └── feature_request.md ├── pull_request_template.md └── workflows │ ├── agreements.yaml │ ├── cd-dashboard-release.yaml │ ├── cd-docs-pdf.yaml │ ├── cd-pages.yaml │ ├── ci-docker-deployment.yaml │ ├── ci-main.yaml │ ├── ci-release-pr.yaml │ ├── ci-release.yaml │ ├── ci-ui-tests.yaml │ ├── exclude-patterns.txt │ ├── mike.yaml │ ├── offline-installation.yaml │ ├── release-notes.yaml │ └── update-tags.yaml ├── .gitignore ├── .gitlab-ci.yml ├── .pre-commit-config.yaml ├── .releaserc ├── .semgrepignore ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── charts └── splunk-connect-for-snmp │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── common │ │ ├── scheduler-config.yaml │ │ ├── scheduler-inventory.yaml │ │ ├── sim-config.yaml │ │ ├── sim-secret.yaml │ │ ├── splunk-secret.yaml │ │ └── traps-config.yaml │ ├── inventory │ │ ├── _helpers.tpl │ │ └── job.yaml │ ├── mongodb-6.0-upgrade-job.yaml │ ├── scheduler │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── networkpolicy.yaml │ │ └── pdb.yaml │ ├── serviceaccount.yaml │ ├── sim │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── deprecated_hpa.yaml │ │ ├── hpa.yaml │ │ ├── pdb.yaml │ │ └── service.yaml │ ├── tests │ │ └── test-connection.yaml │ ├── traps │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── deprecated_hpa.yaml │ │ ├── hpa.yaml │ │ ├── networkpolicy.yaml │ │ ├── pdb.yaml │ │ └── service.yaml │ ├── ui │ │ ├── _helpers.tpl │ │ ├── configmap-backend.yaml │ │ ├── deployment-backend-worker.yaml │ │ ├── deployment-backend.yaml │ │ ├── deployment-frontend.yaml │ │ ├── revert-patch-log-dirs.yaml │ │ ├── role-binding.yaml │ │ ├── role.yaml │ │ ├── service-account.yaml │ │ ├── service-backend.yaml │ │ └── service-frontend.yaml │ └── worker │ │ ├── _helpers.tpl │ │ ├── flower │ │ ├── deployment.yaml │ │ └── service.yaml │ │ ├── networkpolicy.yaml │ │ ├── pdb.yaml │ │ ├── poller │ │ ├── deployment.yaml │ │ ├── deprecated_hpa.yaml │ │ └── hpa.yaml │ │ ├── sender │ │ ├── deployment.yaml │ │ ├── deprecated_hpa.yaml │ │ └── hpa.yaml │ │ └── trap │ │ ├── deployment.yaml │ │ ├── deprecated_hpa.yaml │ │ └── hpa.yaml │ ├── values.schema.json │ └── values.yaml ├── config.yaml ├── config.yaml.example ├── create_packages.sh ├── dashboard └── dashboard.xml ├── deeplists.tex ├── docker_compose ├── .env ├── Corefile ├── docker-compose.yaml ├── manage_logs.py └── manage_secrets.py ├── docs ├── .gitignore ├── architecture │ ├── design.md │ └── planning.md ├── dashboard.md ├── dockercompose │ ├── 1-install-docker.md │ ├── 10-enable-ipv6.md │ ├── 2-download-package.md │ ├── 3-inventory-configuration.md │ ├── 4-scheduler-configuration.md │ ├── 5-traps-configuration.md │ ├── 6-env-file-configuration.md │ ├── 7-snmpv3-secrets.md │ ├── 8-offline-installation.md │ └── 9-splunk-logging.md ├── ha.md ├── images │ ├── dashboard │ │ ├── network_devices_dashboard.png │ │ ├── other_dashboard.png │ │ ├── polling_dashboard.png │ │ ├── snmp_agents_dashboard.png │ │ ├── trap_dashboard.png │ │ └── walk_dashboard.png │ ├── improved-polling-tmp │ │ ├── actions-view.png │ │ └── charts-zip-view.png │ ├── interface_analytics.png │ ├── interface_metrics.png │ ├── request_pdu_flow.png │ ├── sc4snmp_architecture.png │ ├── sc4snmp_deployment.png │ ├── sc4snmp_task_execution.png │ ├── splunk_logo_white.png │ ├── trap.png │ └── ui_docs │ │ ├── apply_changes │ │ ├── retries.png │ │ └── update_time.png │ │ ├── groups │ │ ├── add_device.png │ │ ├── add_group.png │ │ ├── edit_device.png │ │ ├── edit_group.png │ │ └── groups_tab.png │ │ ├── inventory │ │ ├── add_device.png │ │ ├── edit_device.png │ │ ├── edit_group.png │ │ └── inventory_tab.png │ │ └── profiles │ │ ├── add_conditional.png │ │ ├── add_smart_profile.png │ │ ├── add_standard_profile.png │ │ ├── edit_conditional.png │ │ ├── profiles_list.png │ │ └── profiles_types.png ├── improved-polling.md ├── index.md ├── internal │ ├── flower.md │ └── pysnmp_debug.md ├── javascripts │ └── footer.js ├── mib-request.md ├── microk8s │ ├── configuration │ │ ├── configuring-groups.md │ │ ├── configuring-profiles.md │ │ ├── coredns-configuration.md │ │ ├── deployment-configuration.md │ │ ├── mongo-configuration.md │ │ ├── poller-configuration.md │ │ ├── redis-configuration.md │ │ ├── scheduler-configuration.md │ │ ├── sim-configuration.md │ │ ├── snmp-data-format.md │ │ ├── snmpv3-configuration.md │ │ ├── step-by-step-poll.md │ │ ├── trap-configuration.md │ │ ├── values-params-description.md │ │ └── worker-configuration.md │ ├── enable-ipv6.md │ ├── gui │ │ ├── apply-changes.md │ │ ├── enable-gui.md │ │ ├── groups-gui.md │ │ ├── inventory-gui.md │ │ └── profiles-gui.md │ ├── mk8s │ │ ├── k8s-microk8s-scaling.md │ │ └── k8s-microk8s.md │ ├── offlineinstallation │ │ ├── offline-microk8s.md │ │ ├── offline-sc4snmp.md │ │ └── offline-sck.md │ ├── sc4snmp-installation.md │ ├── sck-installation.md │ ├── splunk-requirements.md │ └── upgrade.md ├── releases.md ├── security.md ├── small-environment.md ├── troubleshooting │ ├── configuring-logs.md │ ├── docker-commands.md │ ├── general-issues.md │ ├── k8s-commands.md │ ├── polling-issues.md │ └── traps-issues.md └── videos │ └── setting_analytics.mov ├── entrypoint.sh ├── examples ├── basic_template.md ├── basic_template.yaml ├── custom-config.yamllint ├── lightweight_installation.yaml ├── o11y_values.yaml ├── offline_installation_values.md ├── polling_and_traps_v3.yaml ├── polling_groups_values.yaml ├── polling_values.yaml └── traps_enabled_values.yaml ├── get_yaml_fields.py ├── integration_tests ├── .env ├── README.md ├── README_ENV_SETUP ├── README_INTEGRATION_TESTS ├── README_WALK ├── __init__.py ├── automatic_setup_compose.sh ├── automatic_setup_microk8s.sh ├── conftest.py ├── deploy_and_test.sh ├── install_microk8s.sh ├── install_sck.sh ├── inventory-tests.csv ├── local_cluster.bash ├── prepare_splunk.sh ├── sample_v3_values │ └── snmpv3 │ │ └── test │ │ ├── authKey │ │ ├── authKeyType │ │ ├── authProtocol │ │ ├── privKey │ │ ├── privKeyType │ │ ├── privProtocol │ │ └── userName ├── scheduler-config.yaml ├── scripts │ ├── ansible.cfg │ ├── inventory.tmpl │ ├── local_run.sh │ ├── main.tf.tmpl │ ├── playbook.yml │ └── result_analyzer.py ├── snmpsim │ └── data │ │ ├── 1.3.6.1.6.1.1.0 │ │ └── 127.0.0.1.snmprec │ │ ├── bgp.snmprec │ │ ├── cisco_16_switch.snmprec │ │ ├── demo.snmprec │ │ ├── foreignformats │ │ ├── linux.snmpwalk │ │ ├── winxp1.snmpwalk │ │ └── winxp2.sapwalk │ │ ├── hp_perf.snmprec │ │ ├── hp_perf2.snmprec │ │ ├── mib2dev │ │ ├── host-resources-mib.snmprec │ │ ├── ip-mib.snmprec │ │ ├── tcp-mib.snmprec │ │ └── udp-mib.snmprec │ │ ├── public.snmprec │ │ ├── public │ │ ├── 1.3.6.1.2.1.100.1.13.0.snmprec │ │ ├── 1.3.6.1.2.1.100.1.2.0 │ │ │ └── __1.snmprec │ │ └── 1.3.6.1.6.1.1.0 │ │ │ └── 127.0.0.1.snmprec │ │ ├── recorded │ │ ├── linksys-system.snmprec │ │ ├── linux-full-walk.snmprec │ │ ├── solaris-system.snmprec │ │ ├── udp-endpoint-table-walk.snmprec │ │ └── winxp-full-walk.snmprec │ │ └── variation │ │ ├── delay.snmprec │ │ ├── error.snmprec │ │ ├── multiplex.snmprec │ │ ├── multiplex │ │ ├── 00000.snmprec │ │ ├── 00001.snmprec │ │ ├── 00002.snmprec │ │ ├── 00003.snmprec │ │ ├── 00004.snmprec │ │ ├── 00005.snmprec │ │ ├── 00006.snmprec │ │ ├── 00007.snmprec │ │ ├── 00008.snmprec │ │ ├── 00009.snmprec │ │ └── 00010.snmprec │ │ ├── notification.snmprec │ │ ├── sql.snmprec │ │ ├── subprocess.snmprec │ │ ├── virtualtable.snmprec │ │ └── writecache.snmprec ├── splunk_test_utils.py ├── test_poller_integration.py ├── test_trap_integration.py ├── traps-config.yaml └── values.yaml ├── mkdocs.yml ├── poetry.lock ├── pyproject.toml ├── render_manifests.sh ├── rendered ├── manifests │ ├── tests │ │ └── splunk-connect-for-snmp │ │ │ └── templates │ │ │ ├── common │ │ │ ├── scheduler-config.yaml │ │ │ ├── scheduler-inventory.yaml │ │ │ ├── splunk-secret.yaml │ │ │ └── traps-config.yaml │ │ │ ├── inventory │ │ │ └── job.yaml │ │ │ ├── scheduler │ │ │ ├── deployment.yaml │ │ │ └── pdb.yaml │ │ │ ├── serviceaccount.yaml │ │ │ ├── sim │ │ │ └── pdb.yaml │ │ │ ├── tests │ │ │ └── test-connection.yaml │ │ │ ├── traps │ │ │ ├── deployment.yaml │ │ │ ├── pdb.yaml │ │ │ └── service.yaml │ │ │ └── worker │ │ │ ├── pdb.yaml │ │ │ ├── poller │ │ │ └── deployment.yaml │ │ │ ├── sender │ │ │ └── deployment.yaml │ │ │ └── trap │ │ │ └── deployment.yaml │ ├── tests_autoscaling_enabled │ │ └── splunk-connect-for-snmp │ │ │ └── templates │ │ │ ├── common │ │ │ ├── scheduler-config.yaml │ │ │ ├── scheduler-inventory.yaml │ │ │ ├── splunk-secret.yaml │ │ │ └── traps-config.yaml │ │ │ ├── inventory │ │ │ └── job.yaml │ │ │ ├── scheduler │ │ │ ├── deployment.yaml │ │ │ └── pdb.yaml │ │ │ ├── serviceaccount.yaml │ │ │ ├── sim │ │ │ └── pdb.yaml │ │ │ ├── tests │ │ │ └── test-connection.yaml │ │ │ ├── traps │ │ │ ├── deployment.yaml │ │ │ ├── hpa.yaml │ │ │ ├── pdb.yaml │ │ │ └── service.yaml │ │ │ └── worker │ │ │ ├── pdb.yaml │ │ │ ├── poller │ │ │ ├── deployment.yaml │ │ │ └── hpa.yaml │ │ │ ├── sender │ │ │ ├── deployment.yaml │ │ │ └── hpa.yaml │ │ │ └── trap │ │ │ ├── deployment.yaml │ │ │ └── hpa.yaml │ ├── tests_autoscaling_enabled_deprecated │ │ └── splunk-connect-for-snmp │ │ │ └── templates │ │ │ ├── common │ │ │ ├── scheduler-config.yaml │ │ │ ├── scheduler-inventory.yaml │ │ │ ├── splunk-secret.yaml │ │ │ └── traps-config.yaml │ │ │ ├── inventory │ │ │ └── job.yaml │ │ │ ├── scheduler │ │ │ ├── deployment.yaml │ │ │ └── pdb.yaml │ │ │ ├── serviceaccount.yaml │ │ │ ├── sim │ │ │ └── pdb.yaml │ │ │ ├── tests │ │ │ └── test-connection.yaml │ │ │ ├── traps │ │ │ ├── deployment.yaml │ │ │ ├── deprecated_hpa.yaml │ │ │ ├── pdb.yaml │ │ │ └── service.yaml │ │ │ └── worker │ │ │ ├── pdb.yaml │ │ │ ├── poller │ │ │ ├── deployment.yaml │ │ │ └── deprecated_hpa.yaml │ │ │ ├── sender │ │ │ ├── deployment.yaml │ │ │ └── deprecated_hpa.yaml │ │ │ └── trap │ │ │ ├── deployment.yaml │ │ │ └── deprecated_hpa.yaml │ ├── tests_enable_ui │ │ └── splunk-connect-for-snmp │ │ │ └── templates │ │ │ ├── common │ │ │ ├── scheduler-config.yaml │ │ │ ├── scheduler-inventory.yaml │ │ │ ├── splunk-secret.yaml │ │ │ └── traps-config.yaml │ │ │ ├── inventory │ │ │ └── job.yaml │ │ │ ├── scheduler │ │ │ ├── deployment.yaml │ │ │ └── pdb.yaml │ │ │ ├── serviceaccount.yaml │ │ │ ├── sim │ │ │ └── pdb.yaml │ │ │ ├── tests │ │ │ └── test-connection.yaml │ │ │ ├── traps │ │ │ ├── deployment.yaml │ │ │ ├── pdb.yaml │ │ │ └── service.yaml │ │ │ ├── ui │ │ │ ├── configmap-backend.yaml │ │ │ ├── deployment-backend-worker.yaml │ │ │ ├── deployment-backend.yaml │ │ │ ├── deployment-frontend.yaml │ │ │ ├── revert-patch-log-dirs.yaml │ │ │ ├── role-binding.yaml │ │ │ ├── role.yaml │ │ │ ├── service-account.yaml │ │ │ ├── service-backend.yaml │ │ │ └── service-frontend.yaml │ │ │ └── worker │ │ │ ├── pdb.yaml │ │ │ ├── poller │ │ │ └── deployment.yaml │ │ │ ├── sender │ │ │ └── deployment.yaml │ │ │ └── trap │ │ │ └── deployment.yaml │ ├── tests_only_polling │ │ └── splunk-connect-for-snmp │ │ │ └── templates │ │ │ ├── common │ │ │ ├── scheduler-config.yaml │ │ │ ├── scheduler-inventory.yaml │ │ │ └── splunk-secret.yaml │ │ │ ├── inventory │ │ │ └── job.yaml │ │ │ ├── scheduler │ │ │ ├── deployment.yaml │ │ │ └── pdb.yaml │ │ │ ├── serviceaccount.yaml │ │ │ ├── sim │ │ │ └── pdb.yaml │ │ │ ├── tests │ │ │ └── test-connection.yaml │ │ │ └── worker │ │ │ ├── pdb.yaml │ │ │ ├── poller │ │ │ └── deployment.yaml │ │ │ └── sender │ │ │ └── deployment.yaml │ ├── tests_only_traps │ │ └── splunk-connect-for-snmp │ │ │ └── templates │ │ │ ├── common │ │ │ ├── scheduler-config.yaml │ │ │ ├── splunk-secret.yaml │ │ │ └── traps-config.yaml │ │ │ ├── serviceaccount.yaml │ │ │ ├── sim │ │ │ └── pdb.yaml │ │ │ ├── tests │ │ │ └── test-connection.yaml │ │ │ ├── traps │ │ │ ├── deployment.yaml │ │ │ ├── pdb.yaml │ │ │ └── service.yaml │ │ │ └── worker │ │ │ ├── pdb.yaml │ │ │ ├── sender │ │ │ └── deployment.yaml │ │ │ └── trap │ │ │ └── deployment.yaml │ └── tests_probes_enabled │ │ └── splunk-connect-for-snmp │ │ └── templates │ │ ├── common │ │ ├── scheduler-config.yaml │ │ ├── scheduler-inventory.yaml │ │ ├── splunk-secret.yaml │ │ └── traps-config.yaml │ │ ├── inventory │ │ └── job.yaml │ │ ├── scheduler │ │ ├── deployment.yaml │ │ └── pdb.yaml │ │ ├── serviceaccount.yaml │ │ ├── sim │ │ └── pdb.yaml │ │ ├── tests │ │ └── test-connection.yaml │ │ ├── traps │ │ ├── deployment.yaml │ │ ├── pdb.yaml │ │ └── service.yaml │ │ └── worker │ │ ├── pdb.yaml │ │ ├── poller │ │ └── deployment.yaml │ │ ├── sender │ │ └── deployment.yaml │ │ └── trap │ │ └── deployment.yaml ├── values.yaml ├── values_autoscaling_enabled.yaml ├── values_autoscaling_enabled_deprecated.yaml ├── values_enable_ui.yaml ├── values_only_polling.yaml ├── values_only_traps.yaml └── values_probes_enabled.yaml ├── renovate.json ├── sonar-project.properties ├── splunk_connect_for_snmp ├── .gitignore ├── __init__.py ├── celery_config.py ├── celery_signals_handlers.py ├── common │ ├── __init__.py │ ├── collection_manager.py │ ├── collections_schemas.py │ ├── custom_cache.py │ ├── custom_translations.py │ ├── customised_json_formatter.py │ ├── hummanbool.py │ ├── inventory_processor.py │ ├── inventory_record.py │ ├── requests.py │ ├── schema_migration.py │ └── task_generator.py ├── customtaskmanager.py ├── enrich │ ├── __init__.py │ └── tasks.py ├── inventory │ ├── __init__.py │ ├── loader.py │ └── tasks.py ├── poller.py ├── profiles │ ├── base.yaml │ └── mikrotik.yaml ├── snmp │ ├── auth.py │ ├── const.py │ ├── context.py │ ├── exceptions.py │ ├── manager.py │ ├── tasks.py │ └── varbinds_resolver.py ├── splunk │ ├── __init__.py │ └── tasks.py ├── traps.py └── walk.py ├── test ├── README.md ├── common │ ├── base_profiles │ │ ├── base.yaml │ │ ├── runtime_config_enabled.yaml │ │ ├── runtime_config_with_profiles.yaml │ │ └── runtime_config_without_profiles.yaml │ ├── groups │ │ ├── group_config.yaml │ │ └── groups_config_more_than_one.yaml │ ├── test_custom_cache.py │ ├── test_custom_translations.py │ ├── test_groups.py │ ├── test_humanbool.py │ ├── test_inventory_processor.py │ ├── test_inventory_record.py │ ├── test_profiles.py │ ├── test_schema_migration.py │ └── test_task_generator.py ├── enrich │ ├── test_check_restart.py │ └── test_enrich.py ├── inventory │ ├── test_assign_profiles.py │ ├── test_conditional_profiles.py │ ├── test_inventory_setup_poller.py │ ├── test_loader.py │ └── test_record_validation.py ├── other │ └── test_custom_task_manager.py ├── snmp │ ├── test_any_failure_happened.py │ ├── test_auth.py │ ├── test_do_work.py │ ├── test_get_varbinds.py │ ├── test_group_key.py │ ├── test_mibs.py │ ├── test_process_snmp_data.py │ ├── test_tasks.py │ ├── test_utils.py │ └── test_varbinds_resolver.py ├── splunk │ ├── test_prepare.py │ └── test_send.py ├── test_celery_signals_handlers.py ├── test_poller.py ├── test_traps.py └── test_walk.py └── ui_tests ├── config ├── config.py └── ui_values.yaml ├── conftest.py ├── exceptions_tests.py ├── logger └── logger.py ├── pages ├── groups_page.py ├── header_page.py ├── helper.py ├── inventory_page.py ├── profiles_page.py └── yaml_values_reader.py ├── pytest.ini ├── requirements.txt ├── splunk_search.py ├── tests ├── test_basic.py ├── test_error_handling_and_complex_scenarios.py ├── test_groups_basic.py ├── test_inventory_basic.py ├── test_profiles_basic.py ├── test_save_update_configuration.py └── test_splunk_integration.py └── webdriver └── webriver_factory.py /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .venv 3 | venv 4 | test 5 | docs 6 | charts 7 | .github 8 | .* -------------------------------------------------------------------------------- /.fossa.yml: -------------------------------------------------------------------------------- 1 | version: 3 2 | server: https://app.fossa.com 3 | project: 4 | id: "splunk-connect-for-snmp" 5 | team: "TA-Automation" 6 | 7 | paths: 8 | exclude: 9 | - ui_tests 10 | - test 11 | - integration_tests -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @omrozowicz-splunk 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug---escalation-report.md : -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug / Escalation report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **If your issue is not a bug or a feature request, please raise a support ticket through our support portal (Splunk.com > Support > Support Portal). This will help us resolve your issue more efficiently and provide you with better assistance. For more information on how to work with the Splunk Support, please refer to [this guide](https://splunk.my.site.com/customer/s/article/Working-with-Support-and-the-Support-Portal).** 11 | 12 | **Was the issue replicated by support?** 13 | 14 | **What is the SC4SNMP version?** 15 | 16 | **Which runtime (Docker, MicroK8s) are you using for SC4SNMP?** 17 | 18 | **Is the issue related to some error during installation or first connection to device?** 19 | If so share the values.yaml. 20 | 21 | **Describe the bug** 22 | A clear and concise description of what the bug is. 23 | 24 | **To Reproduce** 25 | Steps to reproduce the behavior: 26 | 1. Go to '...' 27 | 2. Click on '....' 28 | 3. Scroll down to '....' 29 | 4. See error 30 | 31 | **Screenshots and logs** 32 | If applicable, add screenshots to help explain your problem and collect the logs from SC4SNMP. 33 | 34 | **Additional context** 35 | Add any other context about the problem here. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **If your issue is not a bug or a feature request, please raise a support ticket through our support portal (Splunk.com > Support > Support Portal). This will help us resolve your issue more efficiently and provide you with better assistance. For more information on how to work with the Splunk Support, please refer to [this guide](https://splunk.my.site.com/customer/s/article/Working-with-Support-and-the-Support-Portal).** 11 | 12 | ** What is the SC4SNMP version?** 13 | 14 | **Is your feature request related to a problem? Please describe.** 15 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 16 | 17 | **Describe the solution you'd like** 18 | A clear and concise description of what you want to happen. 19 | 20 | **Describe alternatives you've considered** 21 | A clear and concise description of any alternative solutions or features you've considered. 22 | 23 | **Additional context** 24 | Add any other context or screenshots about the feature request here. -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. 4 | 5 | Fixes # (issue) 6 | 7 | ## Type of change 8 | 9 | Please delete options that are not relevant. 10 | 11 | - [ ] Dependency update 12 | - [ ] Bug fix 13 | - [ ] New feature 14 | - [ ] Refactor/improvement 15 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) 16 | - [ ] This change requires a documentation update 17 | 18 | ## How Has This Been Tested? 19 | 20 | Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration 21 | 22 | ## Checklist 23 | 24 | - [ ] My commit message is [conventional](https://www.conventionalcommits.org/en/v1.0.0/#summary) 25 | - [ ] I have run pre-commit on all files before creating the PR 26 | - [ ] I have commented my code, particularly in hard-to-understand areas 27 | - [ ] I have made corresponding changes to the documentation 28 | - [ ] I have added tests that prove my fix is effective or that my feature works 29 | - [ ] New and existing unit tests pass locally with my changes 30 | - [ ] I have checked my code and corrected any misspellings -------------------------------------------------------------------------------- /.github/workflows/agreements.yaml: -------------------------------------------------------------------------------- 1 | name: "CLA Assistant" 2 | on: 3 | issue_comment: 4 | types: [created] 5 | pull_request_target: 6 | types: [opened, closed, synchronize] 7 | 8 | jobs: 9 | call-workflow-agreements: 10 | uses: splunk/addonfactory-github-workflows/.github/workflows/reusable-agreements.yaml@v1.7.1 11 | permissions: 12 | actions: read 13 | contents: read 14 | pull-requests: write 15 | statuses: read 16 | secrets: 17 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 18 | PERSONAL_ACCESS_TOKEN: ${{ secrets.PAT_CLATOOL }} 19 | -------------------------------------------------------------------------------- /.github/workflows/cd-dashboard-release.yaml: -------------------------------------------------------------------------------- 1 | name: dashboard-release 2 | on: 3 | push: 4 | tags: 5 | - "v*" 6 | 7 | jobs: 8 | dashboard-release: 9 | name: Dashboard release 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: write 13 | packages: write 14 | steps: 15 | - name: Check out code 16 | uses: actions/checkout@v4 17 | - name: Upload dashboard to release assets 18 | run: | 19 | VERSION=$(echo $GITHUB_REF | cut -d / -f 3) 20 | gh release upload $VERSION dashboard/dashboard.xml 21 | env: 22 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 23 | -------------------------------------------------------------------------------- /.github/workflows/ci-docker-deployment.yaml: -------------------------------------------------------------------------------- 1 | name: create-compose-files 2 | on: 3 | push: 4 | tags: 5 | - "v*" 6 | 7 | jobs: 8 | build: 9 | name: Build 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: write 13 | packages: write 14 | strategy: 15 | matrix: 16 | python-version: 17 | - 3.10 18 | steps: 19 | - name: Check out code 20 | uses: actions/checkout@v4 21 | - name: Zip docker_compose directory and upload it 22 | run: | 23 | zip -r docker_compose.zip docker_compose 24 | VERSION=$(echo $GITHUB_REF | cut -d / -f 3) 25 | gh release upload $VERSION docker_compose.zip 26 | env: 27 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | - name: Create artifact 29 | uses: actions/upload-artifact@v4 30 | with: 31 | name: ${{ env.ARTIFACT_NAME }} 32 | path: docker_compose.zip 33 | env: 34 | ARTIFACT_NAME: docker_compose 35 | -------------------------------------------------------------------------------- /.github/workflows/exclude-patterns.txt: -------------------------------------------------------------------------------- 1 | otel/testkey.key 2 | otel/testcert.crt -------------------------------------------------------------------------------- /.github/workflows/offline-installation.yaml: -------------------------------------------------------------------------------- 1 | name: offline-installation 2 | on: 3 | push: 4 | tags: 5 | - "v*" 6 | 7 | jobs: 8 | build: 9 | name: Build 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: write 13 | packages: write 14 | strategy: 15 | matrix: 16 | python-version: 17 | - "3.10" 18 | steps: 19 | - name: Check out code 20 | uses: actions/checkout@v4 21 | - name: Setup python 22 | uses: actions/setup-python@v5 23 | with: 24 | python-version: ${{ matrix.python-version }} 25 | - name: Install ruamel.yaml 26 | run: | 27 | pip3 install ruamel.yaml 28 | - name: Download images and upload them 29 | run: | 30 | PYTHON_SCRIPT=$(pwd)/${{ env.GET_YAML_FIELD_SCRIPT }} 31 | ./${{ env.CREATE_PACKAGES_SCRIPT }} "$PYTHON_SCRIPT" 32 | VERSION=$(echo $GITHUB_REF | cut -d / -f 3) 33 | gh release upload --clobber $VERSION /tmp/package/packages/* 34 | env: 35 | CREATE_PACKAGES_SCRIPT: create_packages.sh 36 | GET_YAML_FIELD_SCRIPT: get_yaml_fields.py 37 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 38 | - name: Create artifact 39 | uses: actions/upload-artifact@v4 40 | with: 41 | name: ${{ env.ARTIFACT_NAME }} 42 | path: /tmp/package/packages 43 | env: 44 | ARTIFACT_NAME: offline-installation-packages 45 | -------------------------------------------------------------------------------- /.github/workflows/release-notes.yaml: -------------------------------------------------------------------------------- 1 | name: Release-Notes-Preview 2 | 3 | on: 4 | pull_request: 5 | issue_comment: 6 | types: [ edited ] 7 | 8 | jobs: 9 | call-workflow-preview: 10 | permissions: 11 | contents: write 12 | packages: write 13 | uses: splunk/addonfactory-github-workflows/.github/workflows/reusable-release-notes.yaml@v1.7.1 14 | secrets: 15 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 16 | -------------------------------------------------------------------------------- /.github/workflows/update-tags.yaml: -------------------------------------------------------------------------------- 1 | name: Update Semver 2 | on: 3 | push: 4 | branches-ignore: 5 | - "**" 6 | tags: 7 | - "v*.*.*" 8 | jobs: 9 | update-semver: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: write 13 | packages: write 14 | steps: 15 | - uses: actions/checkout@v4 16 | - uses: haya14busa/action-update-semver@v1 17 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | include: 2 | - file: /cicd/sonarqube-3.0.1.yml 3 | project: ci-cd/templates -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2021 Splunk Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | repos: 17 | - repo: https://github.com/pre-commit/pre-commit-hooks 18 | rev: v4.6.0 19 | hooks: 20 | - id: check-merge-conflict 21 | - id: debug-statements 22 | - repo: https://github.com/asottile/pyupgrade 23 | rev: v3.17.0 24 | hooks: 25 | - id: pyupgrade 26 | args: 27 | - --py3-plus 28 | - repo: https://github.com/psf/black 29 | rev: 24.8.0 30 | hooks: 31 | - id: black 32 | - repo: https://github.com/PyCQA/isort 33 | rev: 5.13.2 34 | hooks: 35 | - id: isort 36 | args: ["--profile", "black"] 37 | - repo: https://github.com/pre-commit/mirrors-mypy 38 | rev: v1.11.2 39 | hooks: 40 | - id: mypy 41 | exclude: (^ui_tests|^test*|^docs) 42 | additional_dependencies: [types-requests, types-PyYAML] 43 | -------------------------------------------------------------------------------- /.semgrepignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | test/ 3 | ui_tests/ 4 | integration_tests/ 5 | rendered/ 6 | examples/ -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10-alpine AS base 2 | 3 | ENV PYTHONFAULTHANDLER=1 \ 4 | PYTHONHASHSEED=random \ 5 | PYTHONUNBUFFERED=1 6 | RUN apk add -U git sqlite-dev 7 | RUN pip install --upgrade setuptools pip 8 | RUN mkdir /app 9 | WORKDIR /app 10 | 11 | FROM base AS builder 12 | RUN pip install --upgrade pip ;\ 13 | pip install poetry 14 | 15 | COPY poetry.lock pyproject.toml /app/ 16 | COPY splunk_connect_for_snmp /app/splunk_connect_for_snmp 17 | WORKDIR /app 18 | RUN poetry config virtualenvs.in-project true ;\ 19 | poetry build ;\ 20 | . /app/.venv/bin/activate ;\ 21 | pip install dist/*.whl 22 | 23 | FROM base AS final 24 | 25 | RUN mkdir /.pysnmp && chown 10001:10001 /.pysnmp 26 | RUN chown 10001:10001 /tmp 27 | USER 10001:10001 28 | COPY --from=builder /app/.venv /app/.venv 29 | COPY entrypoint.sh ./ 30 | ENTRYPOINT ["./entrypoint.sh"] 31 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: render 2 | render: 3 | rm -rf rendered/manifests 4 | helm template -n default --values rendered/values.yaml --output-dir rendered/manifests/tests charts/splunk-connect-for-snmp 5 | rm -rf rendered/manifests/tests/splunk-connect-for-snmp/charts 6 | ./render_manifests.sh 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # splunk-connect-for-snmp 2 | Splunk Connect for SNMP Gets SNMP data in to Splunk Enterprise and Splunk Cloud Platform. 3 | 4 | # Badges 5 | 6 | [![codecov](https://codecov.io/gh/splunk/splunk-connect-for-snmp/branch/main/graph/badge.svg?token=8EALM9BT38)](https://codecov.io/gh/splunk/splunk-connect-for-snmp) 7 | 8 | # Documentation 9 | 10 | For deployment and user documentation [see](https://splunk.github.io/splunk-connect-for-snmp/) 11 | There are plenty of versions you can browse: 12 | 1. `main` refers to the latest version 13 | 2. `develop` refers to the latest `beta` version 14 | 3. tagged versions, for ex. `1.7.1` refers to the specific release 15 | 16 | # Contact 17 | Feel free to contact us via [#splunk-connect-for-snmp](https://splunk-usergroups.slack.com/archives/C01K4V86WV7) slack channel. 18 | 19 | # Support 20 | SC4SNMP is now officially supported by Splunk. Customers who encounter any issues or require assistance can open a support ticket directly with Splunk Support. -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: mongodb 3 | repository: https://charts.bitnami.com/bitnami 4 | version: 15.6.26 5 | - name: redis 6 | repository: https://charts.bitnami.com/bitnami 7 | version: 20.2.2 8 | - name: mibserver 9 | repository: https://pysnmp.github.io/mibs/charts/ 10 | version: 1.15.21 11 | digest: sha256:389e85827643b1799c9a08abe987403eeb5965bd0f1567339e4975f0460c78d3 12 | generated: "2025-06-03T15:48:49.0332+02:00" 13 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Walk profiles no longer include IF-MIB family by default. 2 | If you've used this functionality before, please update the walk profile with ['IF-MIB'] varBind. -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/common/scheduler-config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "splunk-connect-for-snmp.name" . }}-config 5 | labels: 6 | {{- include "splunk-connect-for-snmp.scheduler.labels" . | nindent 4 }} 7 | data: 8 | config.yaml: |- 9 | {{- if (.Values.scheduler).profiles }} 10 | profiles: 11 | {{ .Values.scheduler.profiles | indent 8 -}} 12 | {{ end }} 13 | {{- if (.Values.scheduler).groups }} 14 | groups: 15 | {{ .Values.scheduler.groups | indent 8 -}} 16 | {{ end }} 17 | {{- if (.Values.scheduler).communities }} 18 | communities: 19 | {{ .Values.scheduler.communities | indent 8 }} 20 | {{ else }} 21 | communities: 22 | public: 23 | communityIndex: 24 | contextEngineId: 25 | contextName: 26 | tag: 27 | securityName: 28 | {{- end -}} 29 | {{- if (.Values.scheduler).customTranslations }} 30 | customTranslations: 31 | {{ toYaml .Values.scheduler.customTranslations | indent 8 }} 32 | {{- end -}} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/common/scheduler-inventory.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq (include "splunk-connect-for-snmp.polling.enable" .) "true" }} 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.name" . }}-inventory 6 | labels: 7 | {{- include "splunk-connect-for-snmp.scheduler.labels" . | nindent 4 }} 8 | data: 9 | inventory.csv: | 10 | {{- if (.Values.poller).inventory }} 11 | {{ .Values.poller.inventory | indent 4 }} 12 | {{ else }} 13 | address,port,version,community,secret,securityEngine,walk_interval,profiles,SmartProfiles,delete 14 | {{- end }} 15 | {{- end -}} 16 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/common/sim-config.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.sim.enabled }} 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.name" . }}-sim 6 | namespace: {{ .Release.Namespace | quote }} 7 | data: 8 | otel-collector-config.yaml: | 9 | receivers: 10 | splunk_hec/metrics: 11 | endpoint: 0.0.0.0:8882 12 | exporters: 13 | signalfx: 14 | access_token: $signalfxToken 15 | realm: $signalfxRealm 16 | service: 17 | pipelines: 18 | metrics: 19 | receivers: [splunk_hec/metrics] 20 | exporters: [signalfx] 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/common/sim-secret.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.sim.secret.create .Values.sim.enabled }} 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.sim.secret" . }} 6 | type: Opaque 7 | data: 8 | signalfxToken: {{ .Values.sim.signalfxToken | b64enc | quote }} 9 | signalfxRealm: {{ .Values.sim.signalfxRealm | b64enc | quote }} 10 | {{- end }} 11 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/common/splunk-secret.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.splunk.token }} 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.name" . }}-splunk 6 | type: Opaque 7 | data: 8 | hec_token: {{ .Values.splunk.token | b64enc | quote }} 9 | {{- end }} 10 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/common/traps-config.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq (include "splunk-connect-for-snmp.traps.enable" .) "true" }} 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.name" . }}-traps 6 | labels: 7 | {{- include "splunk-connect-for-snmp.scheduler.labels" . | nindent 4 }} 8 | data: 9 | config.yaml: |- 10 | {{- if .Values.traps.communities }} 11 | communities: 12 | {{- toYaml .Values.traps.communities | nindent 8 }} 13 | {{ end }} 14 | {{- if .Values.traps.usernameSecrets }} 15 | usernameSecrets: 16 | {{- toYaml .Values.traps.usernameSecrets | nindent 8 }} 17 | {{ end }} 18 | {{- end -}} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/mongodb-6.0-upgrade-job.yaml: -------------------------------------------------------------------------------- 1 | {{- $configMapName := printf "%s-config" (include "splunk-connect-for-snmp.name" .) }} 2 | {{- $existingRelease := (lookup "v1" "ConfigMap" .Release.Namespace $configMapName) }} 3 | {{- if $existingRelease }} 4 | apiVersion: batch/v1 5 | kind: Job 6 | metadata: 7 | name: mongo-fcv-upgrade-to-6 8 | annotations: 9 | "helm.sh/hook": pre-upgrade 10 | "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded 11 | spec: 12 | backoffLimit: 1 13 | ttlSecondsAfterFinished: 60 14 | template: 15 | spec: 16 | containers: 17 | - name: mongo-fcv-check 18 | image: {{ .Values.mongodb.image.repository }}:{{ .Values.mongodb.image.tag }} 19 | command: 20 | - /bin/bash 21 | - -c 22 | - | 23 | echo "Checking current mongo FCV" 24 | FCV=$(mongosh --host {{ include "splunk-connect-for-snmp.mongodbHost" . | quote }} --quiet --eval 'db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 }).featureCompatibilityVersion.version') 25 | echo "Current Mongo Feature Compatibility Version: $FCV" 26 | 27 | if [[ "$FCV" < "6.0" ]]; then 28 | echo "FCV < 6.0, setting to 6.0" 29 | mongosh --host {{ include "splunk-connect-for-snmp.mongodbHost" . | quote }} --eval 'db.adminCommand({ setFeatureCompatibilityVersion: "6.0" })' 30 | else 31 | echo "FCV >= 6.0, nothing to be changed" 32 | fi 33 | restartPolicy: Never 34 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/scheduler/networkpolicy.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.scheduler.networkPolicy ( eq (include "splunk-connect-for-snmp.polling.enable" .) "true" ) -}} 2 | apiVersion: networking.k8s.io/v1 3 | kind: NetworkPolicy 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.scheduler.fullname" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.scheduler.labels" . | nindent 4 }} 8 | spec: 9 | podSelector: 10 | matchLabels: 11 | {{- include "splunk-connect-for-snmp.scheduler.selectorLabels" . | nindent 8 }} 12 | policyTypes: 13 | - Ingress 14 | - Egress 15 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/scheduler/pdb.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq (include "splunk-connect-for-snmp.polling.enable" .) "true" }} 2 | apiVersion: policy/v1 3 | kind: PodDisruptionBudget 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.scheduler.fullname" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.scheduler.labels" . | nindent 4 }} 8 | spec: 9 | minAvailable: 1 10 | selector: 11 | matchLabels: 12 | {{- include "splunk-connect-for-snmp.scheduler.selectorLabels" . | nindent 8 }} 13 | {{- end }} 14 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.serviceAccountName" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/sim/deprecated_hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if and ( eq ( toString .Values.sim.autoscaling.enabled ) "true" ) ( eq ( toString .Values.useDeprecatedAPI ) "true" ) }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.sim.fullname" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.sim.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "splunk-connect-for-snmp.sim.fullname" . }} 13 | minReplicas: {{ .Values.sim.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.sim.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.sim.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.sim.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.sim.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.sim.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/sim/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if and (eq ( toString .Values.sim.autoscaling.enabled ) "true") ( eq ( toString .Values.useDeprecatedAPI ) "false" ) }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.sim.fullname" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.sim.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "splunk-connect-for-snmp.sim.fullname" . }} 13 | minReplicas: {{ .Values.sim.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.sim.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.sim.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | averageValue: {{ .Values.sim.autoscaling.targetCPUUtilizationPercentage }} 22 | {{- end }} 23 | {{- if .Values.sim.autoscaling.targetMemoryUtilizationPercentage }} 24 | - type: Resource 25 | resource: 26 | name: memory 27 | target: 28 | averageValue: {{ .Values.sim.autoscaling.targetMemoryUtilizationPercentage }} 29 | {{- end }} 30 | {{- end }} 31 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/sim/pdb.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: policy/v1 2 | kind: PodDisruptionBudget 3 | metadata: 4 | name: {{ include "splunk-connect-for-snmp.sim.fullname" . }} 5 | labels: 6 | {{- include "splunk-connect-for-snmp.sim.labels" . | nindent 4 }} 7 | spec: 8 | minAvailable: 80% 9 | selector: 10 | matchLabels: 11 | {{- include "splunk-connect-for-snmp.sim.selectorLabels" . | nindent 8 }} 12 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/sim/service.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.sim.enabled }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.sim.fullname" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.sim.labels" . | nindent 4 }} 8 | annotations: 9 | metallb.universe.tf/allow-shared-ip: "true" 10 | {{- if .Values.sim.service.annotations }} 11 | {{ toYaml .Values.sim.service.annotations | indent 4 }} 12 | {{- end }} 13 | {{- if .Values.commonAnnotations }} 14 | {{ toYaml .Values.commonAnnotations| indent 4 }} 15 | {{- end }} 16 | spec: 17 | type: ClusterIP 18 | ports: 19 | - port: 8882 20 | name: metrics 21 | selector: 22 | {{- include "splunk-connect-for-snmp.sim.selectorLabels" . | nindent 4 }} 23 | {{- end }} 24 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "splunk-connect-for-snmp.traps.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "splunk-connect-for-snmp.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | "kube-score/ignore": "pod-probes,pod-networkpolicy" 10 | spec: 11 | containers: 12 | - name: wget 13 | image: busybox:1.34.1 14 | imagePullPolicy: Always 15 | command: ['wget'] 16 | args: ['{{ include "splunk-connect-for-snmp.traps.fullname" . }}:{{ .Values.traps.service.port }}'] 17 | securityContext: 18 | capabilities: 19 | drop: 20 | - ALL 21 | readOnlyRootFilesystem: true 22 | runAsNonRoot: true 23 | runAsUser: 10001 24 | runAsGroup: 10001 25 | resources: 26 | limits: 27 | memory: 128Mi 28 | requests: 29 | cpu: 100m 30 | memory: 128Mi 31 | restartPolicy: Never 32 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/traps/deprecated_hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.traps.autoscaling.enabled (eq (include "splunk-connect-for-snmp.traps.enable" .) "true" ) ( eq ( toString .Values.useDeprecatedAPI ) "true" ) }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.traps.fullname" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.traps.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "splunk-connect-for-snmp.traps.fullname" . }} 13 | minReplicas: {{ .Values.traps.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.traps.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.traps.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.traps.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.traps.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.traps.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/traps/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.traps.autoscaling.enabled (eq (include "splunk-connect-for-snmp.traps.enable" .) "true" ) ( eq ( toString .Values.useDeprecatedAPI ) "false" ) }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.traps.fullname" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.traps.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "splunk-connect-for-snmp.traps.fullname" . }} 13 | minReplicas: {{ .Values.traps.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.traps.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.traps.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.traps.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.traps.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Value 30 | averageValue: {{ .Values.traps.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/traps/networkpolicy.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.traps.networkPolicy ( eq (include "splunk-connect-for-snmp.traps.enable" .) "true" ) -}} 2 | apiVersion: networking.k8s.io/v1 3 | kind: NetworkPolicy 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.traps.fullname" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.traps.labels" . | nindent 4 }} 8 | spec: 9 | podSelector: 10 | matchLabels: 11 | {{- include "splunk-connect-for-snmp.traps.selectorLabels" . | nindent 8 }} 12 | policyTypes: 13 | - Ingress 14 | - Egress 15 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/traps/pdb.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq (include "splunk-connect-for-snmp.traps.enable" .) "true" }} 2 | apiVersion: policy/v1 3 | kind: PodDisruptionBudget 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.traps.fullname" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.traps.labels" . | nindent 4 }} 8 | spec: 9 | minAvailable: 80% 10 | selector: 11 | matchLabels: 12 | {{- include "splunk-connect-for-snmp.traps.selectorLabels" . | nindent 8 }} 13 | {{- end -}} 14 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/ui/configmap-backend.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.UI.enable }} 2 | {{ $ui := .Values.UI }} 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: {{ include "splunk-connect-for-snmp.name" . }}-job-configmap 7 | namespace: {{ .Release.Namespace | quote }} 8 | data: 9 | job_config: | 10 | {{- include "splunk-connect-for-snmp.job-config" . | nindent 4 }} 11 | {{- end }} 12 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/ui/deployment-frontend.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.UI.enable }} 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: ui-frontend-deployment 6 | labels: 7 | app: ui-frontend 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: ui-frontend 13 | template: 14 | metadata: 15 | labels: 16 | app: ui-frontend 17 | spec: 18 | containers: 19 | - name: ui-frontend 20 | image: {{ include "splunk-connect-for-snmp.uiFrontImage" . | quote }} 21 | imagePullPolicy: {{ .Values.UI.frontEnd.pullPolicy }} 22 | env: 23 | - name: REACT_APP_FLASK_PORT 24 | value: {{ quote .Values.UI.backEnd.NodePort }} 25 | - name: DEMO_PORT 26 | value: {{ quote .Values.UI.frontEnd.NodePort }} 27 | ports: 28 | - containerPort: {{ .Values.UI.frontEnd.NodePort }} 29 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/ui/revert-patch-log-dirs.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.UI.valuesFileDirectory }} 2 | apiVersion: v1 3 | kind: Pod 4 | metadata: 5 | name: revert-patch-log-dirs 6 | annotations: 7 | "helm.sh/hook": post-delete 8 | "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded 9 | spec: 10 | restartPolicy: Never 11 | containers: 12 | - name: revert-patch-log-dirs 13 | image: {{ .Values.UI.init.repository }} 14 | imagePullPolicy: {{ .Values.UI.init.pullPolicy }} 15 | securityContext: 16 | runAsUser: 0 17 | command: ['sh', '-c', ' 18 | setfacl --recursive --remove-all {{ include "splunk-connect-for-snmp-ui.hostMountPath" . }}; 19 | '] 20 | volumeMounts: 21 | - name: values-directory 22 | mountPath: {{ include "splunk-connect-for-snmp-ui.hostMountPath" . }} 23 | volumes: 24 | - name: values-directory 25 | hostPath: 26 | path: {{ .Values.UI.valuesFileDirectory }} 27 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/ui/role-binding.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.UI.enable }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: RoleBinding 4 | metadata: 5 | name: job-robot 6 | namespace: sc4snmp 7 | subjects: 8 | - kind: ServiceAccount 9 | name: job-robot # Name of the ServiceAccount 10 | namespace: sc4snmp 11 | roleRef: 12 | kind: Role # This must be Role or ClusterRole 13 | name: job-robot # This must match the name of the Role or ClusterRole you wish to bind to 14 | apiGroup: rbac.authorization.k8s.io 15 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/ui/role.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.UI.enable }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | namespace: sc4snmp 6 | name: job-robot 7 | rules: 8 | - apiGroups: [""] # "" indicates the core API group 9 | resources: ["pods"] 10 | verbs: ["get", "list", "watch"] 11 | - apiGroups: ["batch", "extensions"] 12 | resources: ["jobs"] 13 | verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] 14 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/ui/service-account.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.UI.enable }} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: job-robot 6 | namespace: sc4snmp 7 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/ui/service-backend.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.UI.enable }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: ui-backend-entrypoint 6 | spec: 7 | selector: 8 | app: ui-backend 9 | type: NodePort 10 | ports: 11 | - port: 5000 12 | targetPort: 5000 13 | nodePort: {{ .Values.UI.backEnd.NodePort }} 14 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/ui/service-frontend.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.UI.enable }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: ui-frontend-entrypoint 6 | spec: 7 | type: NodePort 8 | selector: 9 | app: ui-frontend 10 | ports: 11 | - port: {{ .Values.UI.frontEnd.NodePort }} 12 | targetPort: {{ .Values.UI.frontEnd.NodePort }} 13 | nodePort: {{ .Values.UI.frontEnd.NodePort }} 14 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/worker/flower/service.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.flower.enabled }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-flower 6 | labels: 7 | {{- include "splunk-connect-for-snmp.worker.flower.labels" . | nindent 4 }} 8 | 9 | 10 | spec: 11 | selector: 12 | {{- include "splunk-connect-for-snmp.worker.flower.selectorLabels" . | nindent 4 }} 13 | ports: 14 | - protocol: TCP 15 | port: {{ .Values.flower.port | default 80 }} 16 | targetPort: 5555 17 | type: LoadBalancer 18 | {{- if .Values.flower.loadBalancerIP }} 19 | externalIPs: 20 | - {{ .Values.flower.loadBalancerIP }} 21 | {{- end }} 22 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/worker/networkpolicy.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.worker.networkPolicy -}} 2 | apiVersion: networking.k8s.io/v1 3 | kind: NetworkPolicy 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }} 6 | labels: 7 | {{- include "splunk-connect-for-snmp.worker.labels" . | nindent 4 }} 8 | spec: 9 | podSelector: 10 | matchLabels: 11 | {{- include "splunk-connect-for-snmp.worker.selectorLabels" . | nindent 8 }} 12 | policyTypes: 13 | - Ingress 14 | - Egress 15 | {{- end }} -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/worker/pdb.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: policy/v1 2 | kind: PodDisruptionBudget 3 | metadata: 4 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }} 5 | labels: 6 | {{- include "splunk-connect-for-snmp.worker.labels" . | nindent 4 }} 7 | spec: 8 | minAvailable: 80% 9 | selector: 10 | matchLabels: 11 | {{- include "splunk-connect-for-snmp.worker.selectorLabels" . | nindent 8 }} 12 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/worker/poller/deprecated_hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if and ( eq (include "splunk-connect-for-snmp.polling.enable" .) "true" ) (eq ( toString .Values.worker.poller.autoscaling.enabled) "true") ( eq ( toString .Values.useDeprecatedAPI ) "true" ) }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-poller 6 | labels: 7 | {{- include "splunk-connect-for-snmp.worker.poller.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-poller 13 | minReplicas: {{ .Values.worker.poller.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.worker.poller.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.worker.poller.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.worker.poller.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- end }} 23 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/worker/poller/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if and ( eq (include "splunk-connect-for-snmp.polling.enable" .) "true" ) (eq ( toString .Values.worker.poller.autoscaling.enabled) "true") ( eq ( toString .Values.useDeprecatedAPI ) "false" ) }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-poller 6 | labels: 7 | {{- include "splunk-connect-for-snmp.worker.poller.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-poller 13 | minReplicas: {{ .Values.worker.poller.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.worker.poller.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.worker.poller.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.worker.poller.autoscaling.targetCPUUtilizationPercentage | default 80 }} 23 | {{- end }} 24 | {{- end }} 25 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/worker/sender/deprecated_hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if and ( eq ( toString .Values.worker.sender.autoscaling.enabled) "true") ( eq ( toString .Values.useDeprecatedAPI ) "true" ) }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-sender 6 | labels: 7 | {{- include "splunk-connect-for-snmp.worker.sender.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-sender 13 | minReplicas: {{ .Values.worker.sender.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.worker.sender.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.worker.sender.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.worker.sender.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- end }} 23 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/worker/sender/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if and ( eq ( toString .Values.worker.sender.autoscaling.enabled) "true") ( eq ( toString .Values.useDeprecatedAPI ) "false" ) }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-sender 6 | labels: 7 | {{- include "splunk-connect-for-snmp.worker.sender.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-sender 13 | minReplicas: {{ .Values.worker.sender.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.worker.sender.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.worker.sender.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.worker.sender.autoscaling.targetCPUUtilizationPercentage | default 80 }} 23 | {{- end }} 24 | {{- end }} 25 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/worker/trap/deprecated_hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if and ( eq (include "splunk-connect-for-snmp.traps.enable" .) "true" ) ( eq ( toString .Values.worker.trap.autoscaling.enabled) "true") ( eq ( toString .Values.useDeprecatedAPI ) "true" ) }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-trap 6 | labels: 7 | {{- include "splunk-connect-for-snmp.worker.trap.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-trap 13 | minReplicas: {{ .Values.worker.trap.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.worker.trap.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.worker.trap.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.worker.trap.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- end }} 23 | -------------------------------------------------------------------------------- /charts/splunk-connect-for-snmp/templates/worker/trap/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if and ( eq (include "splunk-connect-for-snmp.traps.enable" .) "true" ) ( eq ( toString .Values.worker.trap.autoscaling.enabled) "true") ( eq (toString .Values.useDeprecatedAPI) "false" ) }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-trap 6 | labels: 7 | {{- include "splunk-connect-for-snmp.worker.trap.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-trap 13 | minReplicas: {{ .Values.worker.trap.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.worker.trap.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.worker.trap.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.worker.trap.autoscaling.targetCPUUtilizationPercentage | default 80 }} 23 | {{- end }} 24 | {{- end }} 25 | -------------------------------------------------------------------------------- /config.yaml: -------------------------------------------------------------------------------- 1 | profiles: {} -------------------------------------------------------------------------------- /config.yaml.example: -------------------------------------------------------------------------------- 1 | poller: 2 | profiles: 3 | #A standard profile can be disabled as follows 4 | #MIKROTIK: 5 | #enabled: false 6 | 7 | #A Standard profile can be replaced as follows or added 8 | #MIKROTIK: 9 | # frequency: 300 10 | # condition: 11 | # type: "field" 12 | # field: "SNMPv2-MIB.sysObjectID" 13 | # patterns: "^MIKROTIK" 14 | # varBinds: 15 | # # Syntax: [ "MIB-Files", "MIB object name" "MIB index number"] 16 | # - ["MIKROTIK"] 17 | -------------------------------------------------------------------------------- /deeplists.tex: -------------------------------------------------------------------------------- 1 | \usepackage{enumitem} 2 | \setlistdepth{9} 3 | 4 | \setlist[itemize,1]{label=$\bullet$} 5 | \setlist[itemize,2]{label=$\bullet$} 6 | \setlist[itemize,3]{label=$\bullet$} 7 | \setlist[itemize,4]{label=$\bullet$} 8 | \setlist[itemize,5]{label=$\bullet$} 9 | \setlist[itemize,6]{label=$\bullet$} 10 | \setlist[itemize,7]{label=$\bullet$} 11 | \setlist[itemize,8]{label=$\bullet$} 12 | \setlist[itemize,9]{label=$\bullet$} 13 | \renewlist{itemize}{itemize}{9} 14 | 15 | \setlist[enumerate,1]{label=$\arabic*.$} 16 | \setlist[enumerate,2]{label=$\alph*.$} 17 | \setlist[enumerate,3]{label=$\roman*.$} 18 | \setlist[enumerate,4]{label=$\arabic*.$} 19 | \setlist[enumerate,5]{label=$\alpha*$} 20 | \setlist[enumerate,6]{label=$\roman*.$} 21 | \setlist[enumerate,7]{label=$\arabic*.$} 22 | \setlist[enumerate,8]{label=$\alph*.$} 23 | \setlist[enumerate,9]{label=$\roman*.$} -------------------------------------------------------------------------------- /docker_compose/Corefile: -------------------------------------------------------------------------------- 1 | .:53 { 2 | log 3 | errors 4 | auto 5 | reload 6 | forward . 8.8.8.8 2001:4860:4860::8888 7 | } -------------------------------------------------------------------------------- /docs/dockercompose/1-install-docker.md: -------------------------------------------------------------------------------- 1 | # Install Docker 2 | 3 | To install `Docker` in your environment follow steps from the `Install using the apt repository` section from 4 | the Docker [documentation](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository). Install the 5 | latest version. -------------------------------------------------------------------------------- /docs/dockercompose/10-enable-ipv6.md: -------------------------------------------------------------------------------- 1 | # Enabling IPv6 for SC4SNMP 2 | 3 | Default installation of SC4SNMP does not support polling or receiving trap notifications from IPv6 addresses. 4 | To enable IPv6, follow instruction below. 5 | 6 | ## Docker 7 | 8 | Older versions of Docker do not support IPv6 or have know issues with IPv6 configuration. 9 | To avoid any problem with configuring the network, it is recommended to use the latest version of Docker. 10 | 11 | To enable IPv6 for SC4SNMP, set `IPv6_ENABLED` variable to `true` in `.env` file. 12 | The default subnet used for SC4SNMP network in docker is `fd02::/64`, this configuration can be changed in `.env` file under `Network configuration` section. 13 | In case of configuring more than one IPv4 and IPv6 subnet in IPAM, `networks` section of `docker-compose.yaml` should be edited. 14 | 15 | For more information about IPv6 networking in docker, you can check the [official Docker documentation](https://docs.docker.com/engine/daemon/ipv6/). -------------------------------------------------------------------------------- /docs/dockercompose/2-download-package.md: -------------------------------------------------------------------------------- 1 | # Download package with docker compose files 2 | 3 | ## Downloading a package 4 | Package with docker compose configuration files (`docker_compose.zip`) can be downloaded from the [Github release](https://github.com/splunk/splunk-connect-for-snmp/releases). 5 | 6 | ## Configuration 7 | To configure the deployment, follow the instructions in [Inventory configuration](./3-inventory-configuration.md), 8 | [Scheduler configuration](./4-scheduler-configuration.md), [Traps configuration](./5-traps-configuration.md), 9 | [.env file configuration](./6-env-file-configuration.md), [SNMPv3 secrets](./7-snmpv3-secrets.md). 10 | 11 | ## Deploying the app 12 | After configuration, application can be deployed by running the 13 | following command inside the `docker_compose` directory: 14 | 15 | ```shell 16 | sudo docker compose up -d 17 | ``` 18 | 19 | !!! info 20 | The installation process changed from version **1.12.1**. For lower version refer to the corresponding 21 | documentation. 22 | 23 | The same command can be run to apply any updated configuration changes. 24 | 25 | ## Uninstall the app 26 | 27 | To uninstall the app, run the following command inside the `docker_compose` directory: 28 | 29 | ```shell 30 | sudo docker compose down 31 | ``` -------------------------------------------------------------------------------- /docs/dockercompose/3-inventory-configuration.md: -------------------------------------------------------------------------------- 1 | # Inventory configuration 2 | 3 | Inventory configuration is stored in the `inventory.csv` file. Structure of this file is the same as the one of the 4 | `poller.inventory` section in `values.yaml` file. Documentation of this section can be found in [configure inventory](../microk8s/configuration/poller-configuration.md#configure-inventory). 5 | 6 | ## Example of the configuration 7 | 8 | ```csv 9 | address,port,version,community,secret,securityEngine,walk_interval,profiles,smart_profiles,delete 10 | 0.0.0.0,161,2c,public,,,1800,small_walk;test_profile,t, 11 | my_group,161,3,,my_secret,,1800,single_metric,t, 12 | ``` -------------------------------------------------------------------------------- /docs/dockercompose/5-traps-configuration.md: -------------------------------------------------------------------------------- 1 | 2 | Scheduler configuration is stored in the `traps-config.yaml` file. This file has the following sections: 3 | 4 | ```yaml 5 | communities: 6 | 2c: 7 | public: 8 | communityIndex: 9 | contextEngineId: 10 | contextName: 11 | tag: 12 | securityName: 13 | usernameSecrets: [] 14 | ``` 15 | 16 | - `communities`: communities used for version `1` and `2c` of the snmp. The default one is `public`. 17 | - `usernameSecrets`: names of the secrets configured in docker used for `snmp v3` traps . 18 | 19 | ## Example of the configuration 20 | 21 | ```yaml 22 | communities: 23 | 2c: 24 | public: 25 | communityIndex: 26 | contextEngineId: 27 | contextName: 28 | tag: 29 | securityName: 30 | usernameSecrets: 31 | - my_secret 32 | ``` -------------------------------------------------------------------------------- /docs/ha.md: -------------------------------------------------------------------------------- 1 | # High Availability 2 | 3 | The SNMP protocol uses UDP as the transport protocol. Network reliability is a constraint. 4 | Consider network architecture when designing for high availability: 5 | 6 | * When using a single node collector, ensure automatic recovery from virtual infrastructure, such as VMware or Openstack. 7 | * When using a multi-node cluster, ensure nodes are not located in a way where the majority of nodes can be lost. 8 | For example, consider row, rack, network, power and storage. 9 | * When determining the placement of clusters, the closest location by the number of network hops should be used. 10 | * For "data center" applications, collection should be local to the data center. 11 | * Consider using IP Anycast. 12 | -------------------------------------------------------------------------------- /docs/images/dashboard/network_devices_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/dashboard/network_devices_dashboard.png -------------------------------------------------------------------------------- /docs/images/dashboard/other_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/dashboard/other_dashboard.png -------------------------------------------------------------------------------- /docs/images/dashboard/polling_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/dashboard/polling_dashboard.png -------------------------------------------------------------------------------- /docs/images/dashboard/snmp_agents_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/dashboard/snmp_agents_dashboard.png -------------------------------------------------------------------------------- /docs/images/dashboard/trap_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/dashboard/trap_dashboard.png -------------------------------------------------------------------------------- /docs/images/dashboard/walk_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/dashboard/walk_dashboard.png -------------------------------------------------------------------------------- /docs/images/improved-polling-tmp/actions-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/improved-polling-tmp/actions-view.png -------------------------------------------------------------------------------- /docs/images/improved-polling-tmp/charts-zip-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/improved-polling-tmp/charts-zip-view.png -------------------------------------------------------------------------------- /docs/images/interface_analytics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/interface_analytics.png -------------------------------------------------------------------------------- /docs/images/interface_metrics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/interface_metrics.png -------------------------------------------------------------------------------- /docs/images/request_pdu_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/request_pdu_flow.png -------------------------------------------------------------------------------- /docs/images/sc4snmp_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/sc4snmp_architecture.png -------------------------------------------------------------------------------- /docs/images/sc4snmp_deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/sc4snmp_deployment.png -------------------------------------------------------------------------------- /docs/images/sc4snmp_task_execution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/sc4snmp_task_execution.png -------------------------------------------------------------------------------- /docs/images/splunk_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/splunk_logo_white.png -------------------------------------------------------------------------------- /docs/images/trap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/trap.png -------------------------------------------------------------------------------- /docs/images/ui_docs/apply_changes/retries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/apply_changes/retries.png -------------------------------------------------------------------------------- /docs/images/ui_docs/apply_changes/update_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/apply_changes/update_time.png -------------------------------------------------------------------------------- /docs/images/ui_docs/groups/add_device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/groups/add_device.png -------------------------------------------------------------------------------- /docs/images/ui_docs/groups/add_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/groups/add_group.png -------------------------------------------------------------------------------- /docs/images/ui_docs/groups/edit_device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/groups/edit_device.png -------------------------------------------------------------------------------- /docs/images/ui_docs/groups/edit_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/groups/edit_group.png -------------------------------------------------------------------------------- /docs/images/ui_docs/groups/groups_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/groups/groups_tab.png -------------------------------------------------------------------------------- /docs/images/ui_docs/inventory/add_device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/inventory/add_device.png -------------------------------------------------------------------------------- /docs/images/ui_docs/inventory/edit_device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/inventory/edit_device.png -------------------------------------------------------------------------------- /docs/images/ui_docs/inventory/edit_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/inventory/edit_group.png -------------------------------------------------------------------------------- /docs/images/ui_docs/inventory/inventory_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/inventory/inventory_tab.png -------------------------------------------------------------------------------- /docs/images/ui_docs/profiles/add_conditional.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/profiles/add_conditional.png -------------------------------------------------------------------------------- /docs/images/ui_docs/profiles/add_smart_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/profiles/add_smart_profile.png -------------------------------------------------------------------------------- /docs/images/ui_docs/profiles/add_standard_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/profiles/add_standard_profile.png -------------------------------------------------------------------------------- /docs/images/ui_docs/profiles/edit_conditional.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/profiles/edit_conditional.png -------------------------------------------------------------------------------- /docs/images/ui_docs/profiles/profiles_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/profiles/profiles_list.png -------------------------------------------------------------------------------- /docs/images/ui_docs/profiles/profiles_types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/images/ui_docs/profiles/profiles_types.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # Splunk Connect for SNMP 2 | 3 | Splunk welcomes your experimentation and feedback. Let your 4 | account team know that you are testing Splunk Connect for SNMP. 5 | 6 | Splunk Connect for SNMP is an edge-deployed, containerized, and highly 7 | available solution for collecting SNMP data for Splunk Enterprise, 8 | Splunk Enterprise Cloud, and Splunk Infrastructure Monitoring. 9 | 10 | SC4SNMP provides context-full information. It not only forwards SNMP data to Splunk, but also integrates the data into 11 | meaningful objects. For example, you do not need to write queries in order to gather information about 12 | interfaces of the device, because SC4SNMP does that automatically: 13 | 14 | [![Interface metrics](images/interface_metrics.png)](images/interface_metrics.png) 15 | 16 | This makes it easy to visualize the data in Splunk Analytics: 17 | 18 | [![Interface analytics](images/interface_analytics.png)](images/interface_analytics.png) 19 | 20 | Here is a short presentation of how to browse SNMP data in Splunk: 21 | 22 | ![type:video](videos/setting_analytics.mov) 23 | 24 | SC4SNMP can also easily monitor trap events sent by different SNMP devices. Trap events are JSON formatted, and are stored under the `netops` index. 25 | 26 | [![Trap example](images/trap.png)](images/trap.png) 27 | -------------------------------------------------------------------------------- /docs/internal/flower.md: -------------------------------------------------------------------------------- 1 | # Celery admin panel (internal) 2 | 3 | Main component of SC4SNMP architecture is Celery framework that can run background and periodic tasks (like polling and walk). It can be helpful to administrate Celery cluster using admin panel with [Flower](https://github.com/mher/flower). 4 | 5 | ## k8s 6 | 7 | Just add `flower` section on `values.yaml`: 8 | 9 | ``` 10 | flower: 11 | enabled: true 12 | loadBalancerIP: x.x.x.x 13 | ``` 14 | 15 | 16 | ## docker-compose 17 | 18 | Just use `--profile debug` flag to run optional `flower` service together with SC4SNMP: `docker-compose --profile debug up` -------------------------------------------------------------------------------- /docs/internal/pysnmp_debug.md: -------------------------------------------------------------------------------- 1 | # PYSNP debug mode (internal) 2 | 3 | During the on-calls and escalations, it might be helpful to understand low-levels details that are happening on SNMP protocol side. For that we are using `debug logger` from `pysnmp lib`. 4 | 5 | 6 | List of available debug modes: 7 | * io 8 | * dsp 9 | * msgproc 10 | * secmod 11 | * mibbuild 12 | * mibview 13 | * mibinstrum 14 | * acl 15 | * proxy 16 | * app 17 | * all 18 | 19 | 20 | ## docker-compose 21 | 22 | Add on `.env` file `PYSNMP_DEBUG` variable and specify debug modes in comma-separated format: 23 | 24 | ``` 25 | PYSNMP_DEBUG=dsp,msgproc,io 26 | ``` 27 | 28 | ## k8s 29 | 30 | Add on top level of `values.yaml` file `pysnmpDebug` variable and specify debug modes (using comma-separated format): 31 | 32 | ``` 33 | pysnmpDebug: "dsp,msgproc,io" 34 | ``` -------------------------------------------------------------------------------- /docs/javascripts/footer.js: -------------------------------------------------------------------------------- 1 | function legalFooter() { 2 | var copyright = document.createElement('div'); 3 | copyright.classList.add('md-copyright__highlight'); 4 | var content = document.createElement('p'); 5 | content.style.textAlign = 'center'; 6 | var termsLink = document.createElement('a'); 7 | termsLink.href = 'https://github.com/splunk/splunk-connect-for-snmp/blob/main/LICENSE'; 8 | termsLink.innerHTML = 'Apache 2.0'; 9 | content.append('Splunk Documentation covered by: '); 10 | content.append(termsLink); 11 | 12 | var endElement = document.getElementsByTagName('main')[0]; 13 | endElement.insertAdjacentElement("afterend", content); 14 | } 15 | 16 | legalFooter() -------------------------------------------------------------------------------- /docs/microk8s/configuration/mongo-configuration.md: -------------------------------------------------------------------------------- 1 | # Mongo DB Configuration 2 | 3 | Mongo DB is used as the database for keeping schedules. 4 | 5 | ### MongoDB configuration file 6 | 7 | MongoDB configuration is kept in the `values.yaml` file in the `mongodb` section. 8 | `values.yaml` is used during the installation process for configuring kubernetes values. 9 | 10 | See the following example: 11 | ```yaml 12 | mongodb: 13 | #Architecture, Architecture for Mongo deployments is immutable to move from standalone to replicaset will require a uninstall. 14 | # "replicaset" for HA or multi node deployments 15 | # "standalone" for single node non HA 16 | #architecture: "standalone" 17 | pdb: 18 | create: true 19 | #The following requests and limits are appropriate starting points 20 | #For productions deployments 21 | resources: 22 | limits: 23 | cpu: 2 24 | memory: 2Gi 25 | requests: 26 | cpu: 750m 27 | memory: 512Mi 28 | persistence: 29 | storageClass: "microk8s-hostpath" 30 | volumePermissions: 31 | enabled: true 32 | ``` 33 | 34 | It is recommended not to change this setting. If it is necessary to change it, see [MongoDB on Kubernetes](https://github.com/bitnami/charts/tree/master/bitnami/mongodb/). 35 | -------------------------------------------------------------------------------- /docs/microk8s/configuration/redis-configuration.md: -------------------------------------------------------------------------------- 1 | # Redis configuration 2 | 3 | Recently, RabbitMQ was replaced with Redis as a queue service and periodic task database. The reason for this is to increase SC4SNMP performance and protect against bottlenecks. 4 | 5 | Redis both manages periodic tasks and queues the SC4SNMP service. It queues tasks like SNMP Walk and Poll. 6 | 7 | ### Redis configuration file 8 | 9 | Redis configuration is kept in the `values.yaml` file in the `redis` section. 10 | `values.yaml` is used during the installation process to configure Kubernetes values. 11 | 12 | To edit the configuration, see [Redis on Kubernetes](https://github.com/bitnami/charts/tree/master/bitnami/redis). 13 | -------------------------------------------------------------------------------- /docs/microk8s/configuration/snmpv3-configuration.md: -------------------------------------------------------------------------------- 1 | # SNMPv3 user configuration 2 | 3 | Configuration of SNMP v3, when supported by the monitored devices, is the most secure choice available 4 | for authentication and data privacy. Each set of credentials will be stored as "Secret" objects in k8s, 5 | and will be referenced in `values.yaml`. This allows the secret to be created once, including automation 6 | by third-party password managers, then consumed without storing sensitive data in plain text. 7 | 8 | ```bash 9 | # =Arbitrary name of the secret often the same as the username or prefixed with "sc4snmp-" 10 | # =Namespace used to install sc4snmp 11 | # =the SNMPv3 Username 12 | # =key note must be at least 8 char long subject to target limitations 13 | # =One of SHA (SHA1) or MD5 14 | # =One of AES or DES 15 | # Note MD5 and DES are considered insecure but must be supported for standards compliance 16 | microk8s kubectl create -n secret generic \ 17 | --from-literal=userName= \ 18 | --from-literal=authKey= \ 19 | --from-literal=privKey= \ 20 | --from-literal=authProtocol= \ 21 | --from-literal=privProtocol= 22 | ``` 23 | 24 | Configured credentials can be used in [poller](poller-configuration.md) and [trap](trap-configuration.md) services. 25 | In service configuration, `secretname` needs to be provided. 26 | -------------------------------------------------------------------------------- /docs/microk8s/gui/apply-changes.md: -------------------------------------------------------------------------------- 1 | # Apply changes 2 | 3 | 4 | In order to apply changes from the GUI to the core SC4SNMP, press the `Apply changes` button. Update can be made minimum 5 minutes 5 | after the previous one was applied. If the `Apply changes` button is clicked earlier, new update will be scheduled automatically 6 | and the following message with ETA will be displayed: 7 | 8 | 9 | ![ETA](../../images/ui_docs/apply_changes/update_time.png){ style="border:2px solid; width:500px; height:auto" } 10 | 11 | 12 | Scheduled update triggers new kubernetes job `job/snmp-splunk-connect-for-snmp-inventory`. If the ETA elapsed and the 13 | previous `job/snmp-splunk-connect-for-snmp-inventory` is still present in the `sc4snmp` kubernetes namespace, 14 | creation of the new job will be retried 10 times. If `Apply changes` is clicked during retries, the following message 15 | will be displayed: 16 | 17 | 18 | ![Retries](../../images/ui_docs/apply_changes/retries.png){ style="border:2px solid; width:500px; height:auto" } -------------------------------------------------------------------------------- /docs/microk8s/gui/groups-gui.md: -------------------------------------------------------------------------------- 1 | # Configuring groups in GUI 2 | 3 | SC4SNMP [groups](../configuration/configuring-groups.md) can be configured in `Groups` tab. 4 | 5 | ![Groups tab](../../images/ui_docs/groups/groups_tab.png){ style="border:2px solid" } 6 | 7 |
8 | 9 | After pressing `Add group` button or plus sign next to the `Group`, new group can be added. 10 | 11 | 12 | ![New group](../../images/ui_docs/groups/add_group.png){style="border:2px solid; width:500px; height:auto" } 13 | 14 |
15 | 16 | Configured groups are displayed on the left-hand side, under the `Group name` label. After clicking on the group name, 17 | all devices belonging to the given group are displayed. To add a new device, click the plus sign next to the group name. 18 | Configuration of the device is the same as in the `values.yaml` file. For details check [Configuring groups](../configuration/configuring-groups.md). 19 | 20 | 21 | ![Add a device](../../images/ui_docs/groups/add_device.png){style="border:2px solid; width:500px; height:auto" } 22 | 23 |
24 | 25 | To edit a group name, click the pencil icon next to the group name. 26 | 27 | 28 | ![Edit group](../../images/ui_docs/groups/edit_group.png){style="border:2px solid; width:500px; height:auto" } 29 | 30 |
31 | 32 | To edit device, click the pencil icon in the row of the given device. 33 | 34 | 35 | ![Edit device](../../images/ui_docs/groups/edit_device.png){style="border:2px solid; width:500px; height:auto" } -------------------------------------------------------------------------------- /docs/microk8s/gui/inventory-gui.md: -------------------------------------------------------------------------------- 1 | # Configuring inventory in GUI 2 | 3 | SC4SNMP [inventory](../configuration/poller-configuration.md#poller-configuration-file) can be configured in `Inventory` tab. 4 | 5 | ![Profiles tab](../../images/ui_docs/inventory/inventory_tab.png){ style="border:2px solid" } 6 | 7 |
8 | 9 | After pressing `Add device/group` button, new single device or group can be added. 10 | Configuration of the device is the same as in the `inventory.yaml` file. For details check [Poller configuration](../configuration/poller-configuration.md#poller-configuration-file). 11 | 12 | 13 | ![New device/group](../../images/ui_docs/inventory/add_device.png){style="border:2px solid; width:500px; height:auto" } 14 | 15 |
16 | 17 | To edit a device or group, click the pencil icon next in the desired row. 18 | 19 | 20 | ![Edit device](../../images/ui_docs/inventory/edit_device.png){style="border:2px solid; width:500px; height:auto" } 21 | ![Edit group](../../images/ui_docs/inventory/edit_group.png){style="border:2px solid; width:500px; height:auto" } -------------------------------------------------------------------------------- /docs/microk8s/gui/profiles-gui.md: -------------------------------------------------------------------------------- 1 | # Configuring profiles in GUI 2 | 3 | SC4SNMP [profiles](../configuration/configuring-profiles.md) can be configured in `Profiles` tab. 4 | 5 | ![Profiles tab](../../images/ui_docs/profiles/profiles_list.png){ style="border:2px solid" } 6 | 7 |
8 | 9 | After pressing `Add profile` button, new profile will be added. 10 | Configuration of the profile is the same as in the `values.yaml` file. For details check [Configuring profiles](../configuration/configuring-profiles.md). 11 | 12 | 13 | ![Add standard profile](../../images/ui_docs/profiles/add_standard_profile.png){style="border:2px solid; width:500px; height:auto" } 14 | 15 |
16 | 17 | Type of the profile can be changed: 18 | 19 | 20 | ![Profile types](../../images/ui_docs/profiles/profiles_types.png){ style="border:2px solid; width:500px; height:auto" } 21 | 22 |
23 | 24 | Examples of configuration of `Smart` and `Conditional` profiles: 25 | 26 | 27 | ![Smart profile](../../images/ui_docs/profiles/add_smart_profile.png){ style="border:2px solid; width:500px; height:auto" } 28 | ![Conditional profile](../../images/ui_docs/profiles/add_conditional.png){ style="border:2px solid; width:500px; height:auto" } 29 | 30 |
31 | 32 | All configured profiles can be edited by clicking the pencil icon: 33 | 34 | 35 | ![Edit confitional profile](../../images/ui_docs/profiles/edit_conditional.png){ style="border:2px solid; width:500px; height:auto" } -------------------------------------------------------------------------------- /docs/releases.md: -------------------------------------------------------------------------------- 1 | # Base Information 2 | 3 | ## Known Issues 4 | The list of open known issues is available under [Known issue link](https://github.com/splunk/splunk-connect-for-snmp/issues?q=is%3Aopen+is%3Aissue+label%3A%22known+issue%22). 5 | 6 | ## Open issues to the product 7 | To open an issue for Splunk Connect for SNMP, go to the [github SC4SNMP](https://github.com/splunk/splunk-connect-for-snmp/issues) 8 | project and open an issue. 9 | 10 | ## Releases 11 | To check Splunk Connect for SNMP releases, see: [SC4SNMP Releases](https://github.com/splunk/splunk-connect-for-snmp/releases) 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/security.md: -------------------------------------------------------------------------------- 1 | # Security Considerations 2 | 3 | The SC4SNMP solution implements SNMP in a compatible mode for current and legacy network device gear. 4 | SNMP is a protocol widely considered to be risky and requires threat mitigation at the network level. 5 | 6 | * Do not expose SNMP endpoints to untrusted connections such as the internet or general LAN network of a typical enterprise. 7 | * Do not allow SNMPv1 or SNMPv2 connections to cross a network zone where a man in the middle interception is possible. 8 | * Many SNMPv3 devices rely on insecure cryptography including DES, MD5, and SHA. Do not assume that SNMPv3 devices and connections are secure by default. 9 | * When possible use SNMPv3 with the most secure mutually supported protocol options. 10 | * The default IP of each node should be considered a management interface and should be protected from network 11 | access by an untrusted device by a hardware or software firewall. When possible the IP allocated for SNMP communication should not be shared by the management interface. 12 | -------------------------------------------------------------------------------- /docs/small-environment.md: -------------------------------------------------------------------------------- 1 | # Lightweight SC4SNMP installation 2 | 3 | SC4SNMP can be successfully installed in small environments with 2 CPUs and 4 GB of memory. 4 | However, Splunk OpenTelemetry Collector for Kubernetes cannot be installed in a small 5 | environment along with SC4SNMP. Additionally, the `resources` limits must be set for Kubernetes 6 | pods or Docker containers. See the example of `values.yaml` with the appropriate resources [here][lightweight_doc_link]. 7 | 8 | For the rest of installation process you can follow the instructions from **Getting started** section with the deployment of your choice. 9 | 10 | Keep in mind that a lightweight instance of SC4SNMP will not be able to poll from many devices and may experience delays 11 | if there is frequent polling. 12 | 13 | [lightweight_doc_link]: https://github.com/splunk/splunk-connect-for-snmp/blob/main/examples/lightweight_installation.yaml 14 | -------------------------------------------------------------------------------- /docs/troubleshooting/general-issues.md: -------------------------------------------------------------------------------- 1 | ## General issues 2 | 3 | ### Upgrading SC4SNMP from 1.12.2 to 1.12.3 4 | 5 | When upgrading SC4SNMP from version `1.12.2` to `1.12.3`, the subchart version of MongoDB will be updated from `13.18.5` to `15.6.26`. This upgrade requires an increase in the MongoDB `Feature Compatibility Version (FCV)` from `5.0` to `6.0`. 6 | 7 | To facilitate this change, a new pre-upgrade job has been introduced in SC4SNMP: `mongo-fcv-upgrade-to-6`. This job automatically updates the Feature Compatibility Version on MongoDB before the installation of MongoDB version `15.6.26`. 8 | 9 | #### Pre-Upgrade Job: `mongo-fcv-upgrade-to-6` 10 | 11 | - The `mongo-fcv-upgrade-to-6` job is designed to ensure compatibility by running the FCV update prior to upgrading MongoDB. 12 | 13 | #### Handling Job Failures 14 | 15 | If the `mongo-fcv-upgrade-to-6` job fails for any reason, there are two recovery options: 16 | 17 | 1. **Reinstall SC4SNMP**: 18 | 19 | [Reinstall SC4SNMP](../../microk8s/sc4snmp-installation#restart-splunk-connect-for-snmp) with **Persistent Volume Claim (PVC) deletion**. 20 | 21 | 2. **Manually Update MongoDB**: 22 | 23 | [Update MongoDB's Feature Compatibility Version](https://www.mongodb.com/docs/manual/release-notes/6.0-upgrade-standalone/#upgrade-procedure) manually by executing the following command: 24 | ```bash 25 | microk8s exec -it pod/ -n sc4snmp mongosh 26 | db.adminCommand( { setFeatureCompatibilityVersion: "6.0" }) 27 | ``` 28 | 29 | Replace `` with the actual Pod ID of your MongoDB instance. -------------------------------------------------------------------------------- /docs/videos/setting_analytics.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/docs/videos/setting_analytics.mov -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -e 3 | . /app/.venv/bin/activate 4 | LOG_LEVEL=${LOG_LEVEL:=INFO} 5 | WORKER_CONCURRENCY=${WORKER_CONCURRENCY:=4} 6 | wait-for-dep "${CELERY_BROKER_URL}" "${REDIS_URL}" "${MONGO_URI}" "${MIB_INDEX}" 7 | 8 | case $1 in 9 | 10 | inventory) 11 | inventory-loader 12 | ;; 13 | 14 | celery) 15 | case $2 in 16 | beat) 17 | celery -A splunk_connect_for_snmp.poller beat -l "$LOG_LEVEL" --max-interval=10 18 | ;; 19 | worker-trap) 20 | celery -A splunk_connect_for_snmp.poller worker -l "$LOG_LEVEL" -Q traps --autoscale=8,"$WORKER_CONCURRENCY" 21 | ;; 22 | worker-poller) 23 | celery -A splunk_connect_for_snmp.poller worker -l "$LOG_LEVEL" -O fair -Q poll --autoscale=8,"$WORKER_CONCURRENCY" 24 | ;; 25 | worker-sender) 26 | celery -A splunk_connect_for_snmp.poller worker -l "$LOG_LEVEL" -Q send --autoscale=6,"$WORKER_CONCURRENCY" 27 | ;; 28 | flower) 29 | celery -A splunk_connect_for_snmp.poller flower 30 | ;; 31 | *) 32 | celery "$2" 33 | ;; 34 | esac 35 | ;; 36 | trap) 37 | traps "$LOG_LEVEL" 38 | ;; 39 | *) 40 | echo -n unknown cmd "$@" 41 | ;; 42 | esac -------------------------------------------------------------------------------- /examples/basic_template.yaml: -------------------------------------------------------------------------------- 1 | splunk: 2 | enabled: true 3 | protocol: https 4 | host: ###SPLUNK_HOST### 5 | token: ###SPLUNK_TOKEN### 6 | insecureSSL: "false" 7 | port: "###SPLUNK_PORT###" 8 | traps: 9 | communities: 10 | 2c: 11 | - public 12 | usernameSecrets: 13 | - testuser1 14 | securityEngineId: 15 | - "80003a8c04" 16 | loadBalancerIP: ###TRAP_RECEIVER_IP### 17 | scheduler: 18 | groups: | 19 | switch_group: 20 | - address: ###POLLED_DEVICE_IP### 21 | - address: ###POLLED_DEVICE_IP### 22 | - address: ###POLLED_DEVICE_IP### 23 | - address: ###POLLED_DEVICE_IP### 24 | port: 163 25 | profiles: | 26 | small_walk: 27 | condition: 28 | type: walk 29 | varBinds: 30 | - ["TCP-MIB"] 31 | - ["IF-MIB"] 32 | - ["IP-MIB"] 33 | generic_switch: 34 | frequency: 300 35 | varBinds: 36 | - ['SNMPv2-MIB', 'sysDescr'] 37 | - ['SNMPv2-MIB', 'sysName', 0] 38 | - ['TCP-MIB', 'tcpActiveOpens'] 39 | - ['TCP-MIB', 'tcpAttemptFails'] 40 | - ['IF-MIB'] 41 | poller: 42 | usernameSecrets: 43 | - testuser1 44 | inventory: | 45 | address,port,version,community,secret,security_engine,walk_interval,profiles,smart_profiles,delete 46 | ###POLLED_DEVICE_IP###,,3,,testuser1,,3000,small_walk;generic_switch,, 47 | switch_group,,2c,public,,,3000,small_walk,, -------------------------------------------------------------------------------- /examples/custom-config.yamllint: -------------------------------------------------------------------------------- 1 | extends: default 2 | 3 | rules: 4 | line-length: 5 | max: 80 6 | level: warning 7 | -------------------------------------------------------------------------------- /examples/o11y_values.yaml: -------------------------------------------------------------------------------- 1 | splunk: 2 | # splunk integration is enabled by default, so in order to use only o11y, you need to disable splunk 3 | # alternatively, use both of them at once 4 | enabled: false 5 | sim: 6 | enabled: true 7 | signalfxToken: xxxxxx 8 | signalfxRealm: us0 9 | scheduler: 10 | profiles: | 11 | small_walk: 12 | condition: 13 | type: walk 14 | varBinds: 15 | - ['TCP-MIB'] 16 | - ['IF-MIB'] 17 | - ['IP-MIB'] 18 | IF_profile: 19 | frequency: 600 20 | varBinds: 21 | - [ 'IF-MIB', 'ifDescr' ] 22 | - [ 'IF-MIB', 'ifAdminStatus' ] 23 | - [ 'IF-MIB', 'ifName' ] 24 | - [ 'IF-MIB','ifAlias' ] 25 | - [ 'IF-MIB', 'ifInDiscards' ] 26 | - [ 'IF-MIB', 'ifInErrors' ] 27 | - [ 'IF-MIB', 'ifInNUcastPkts' ] 28 | - [ 'IF-MIB', 'ifInOctets' ] 29 | - [ 'IF-MIB', 'ifInUcastPkts' ] 30 | - [ 'IF-MIB', 'ifInUnknownProtos' ] 31 | - [ 'IF-MIB', 'ifOutDiscards' ] 32 | - [ 'IF-MIB', 'ifOutErrors' ] 33 | - [ 'IF-MIB', 'ifOutNUcastPkts' ] 34 | - [ 'IF-MIB', 'ifOutOctets' ] 35 | - [ 'IF-MIB', 'ifOutQLen' ] 36 | - [ 'IF-MIB', 'ifOutUcastPkts' ] 37 | ICMP_profile: 38 | frequency: 500 39 | varBinds: 40 | - ['IP-MIB', 'icmp'] 41 | poller: 42 | inventory: | 43 | address,port,version,community,secret,security_engine,walk_interval,profiles,smart_profiles,delete 44 | 54.82.4.248,,2c,public,,,4000,small_walk;IF_profile;ICMP_profile,, 45 | 54.82.4.249,,2c,public,,,1800,small_walk;IF_profile,, 46 | -------------------------------------------------------------------------------- /examples/polling_and_traps_v3.yaml: -------------------------------------------------------------------------------- 1 | splunk: 2 | enabled: true 3 | protocol: https 4 | host: i-0d903f60788be4c68.ec2.splunkit.io 5 | token: 00000000-0000-0000-0000-000000000000 6 | insecureSSL: "false" 7 | port: "8088" 8 | traps: 9 | # Remember to create sc4snmp-homesecure-sha-aes and sc4snmp-homesecure-sha-des secrets beforehand 10 | # this is how to do it: https://splunk.github.io/splunk-connect-for-snmp/main/microk8s/microk8s/configuration/snmpv3-configuration/ 11 | usernameSecrets: 12 | - sc4snmp-homesecure-sha-aes 13 | - sc4snmp-homesecure-sha-des 14 | securityEngineId: 15 | - "80003a8c04" 16 | loadBalancerIP: 10.202.4.202 17 | scheduler: 18 | profiles: | 19 | switch_profile: 20 | frequency: 60 21 | varBinds: 22 | - ['IF-MIB'] 23 | - ['UCD-SNMP-MIB'] 24 | poller: 25 | # Remember to create sc4snmp-hlab-sha-aes secret beforehand 26 | # this is how to do it: https://splunk.github.io/splunk-connect-for-snmp/main/microk8s/configuration/snmpv3-configuration/ 27 | usernameSecrets: 28 | - sc4snmp-hlab-sha-aes 29 | inventory: | 30 | address,port,version,community,secret,security_engine,walk_interval,profiles,smart_profiles,delete 31 | 54.82.4.248,,3,public,sc4snmp-hlab-sha-aes,,2000,switch_profile,, 32 | -------------------------------------------------------------------------------- /examples/polling_groups_values.yaml: -------------------------------------------------------------------------------- 1 | splunk: 2 | enabled: true 3 | protocol: https 4 | host: i-0d903f60788be4c68.ec2.splunkit.io 5 | token: 00000000-0000-0000-0000-000000000000 6 | insecureSSL: "true" 7 | port: "8088" 8 | scheduler: 9 | groups: | 10 | switch_group: 11 | - address: 10.202.4.201 12 | - address: 10.202.4.202 13 | - address: 10.202.4.203 14 | - address: 10.202.4.204 15 | port: 163 16 | profiles: | 17 | switch_profile: 18 | frequency: 60 19 | varBinds: 20 | - ['IF-MIB'] 21 | - ['UCD-SNMP-MIB'] 22 | poller: 23 | inventory: | 24 | address,port,version,community,secret,security_engine,walk_interval,profiles,smart_profiles,delete 25 | switch_group,,2c,public,,,2000,switch_profile,, 26 | -------------------------------------------------------------------------------- /examples/traps_enabled_values.yaml: -------------------------------------------------------------------------------- 1 | splunk: 2 | enabled: true 3 | protocol: https 4 | host: i-0d903f60788be4c68.ec2.splunkit.io 5 | token: 00000000-0000-0000-0000-000000000000 6 | insecureSSL: "false" 7 | port: "8088" 8 | traps: 9 | communities: 10 | 2c: 11 | - public 12 | - homelab 13 | loadBalancerIP: 10.202.6.213 14 | -------------------------------------------------------------------------------- /get_yaml_fields.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import os 3 | 4 | import ruamel.yaml 5 | 6 | parser = argparse.ArgumentParser() 7 | parser.add_argument("path") 8 | parser.add_argument("variable") 9 | args = parser.parse_args() 10 | 11 | if os.path.isfile(args.path): 12 | yaml = ruamel.yaml.YAML() 13 | with open(args.path) as file: 14 | value = yaml.load(file) 15 | keys = args.variable.split(".") 16 | wrong_key = False 17 | for i, el in enumerate(keys): 18 | value = value.get(el, None) 19 | if value is None: 20 | wrong_key = True 21 | break 22 | if not wrong_key: 23 | print(value) 24 | else: 25 | print("") 26 | else: 27 | print("") 28 | -------------------------------------------------------------------------------- /integration_tests/README.md: -------------------------------------------------------------------------------- 1 | ## Running integration tests 2 | 3 | ### Set environmental variables 4 | 5 | Create script `set_env.sh` in `scripts` folder with the following content: 6 | 7 | ```bash 8 | export AWS_ACCESS_KEY_ID= 9 | export AWS_SECRET_ACCESS_KEY= 10 | export AWS_SECURITY_GROUP= 11 | export AWS_SUBNET= 12 | ``` 13 | 14 | Fill values to match your AWS settings. 15 | 16 | ### Run integration tests 17 | 18 | Run script from `scripts` folder: 19 | 20 | ```commandline 21 | ./local_run.sh 22 | ``` 23 | 24 | When the environment is created, you can log there using `ansible_host` created in `inventory.yaml` and 25 | `snmp-ssh-key.pem` from `.ssh` folder. The created username is `ubuntu`. For example, if `ansible_host` is `54.90.167.146`, 26 | you can use ssh with: 27 | 28 | ```commandline 29 | ssh -i .ssh/snmp-ssh-key.pem ubuntu@54.90.167.146 30 | ``` 31 | 32 | You can observe the progress in `~/splunk-connect-for-snmp/integration_tests/pytest.log` -------------------------------------------------------------------------------- /integration_tests/README_INTEGRATION_TESTS: -------------------------------------------------------------------------------- 1 | How to run an integration test? 2 | 3 | Right now we support only NOVA. 4 | - login into NOVA: https://splunkit.io/ec2 5 | - create an EC2 instance with the following specs: 6 | - m5.xlarge 7 | - 50 GB (this is the default value) 8 | - Ubuntu 20 9 | 10 | 11 | - git clone https://github.com/splunk/splunk-connect-for-snmp.git 12 | - cd splunk-connect-for-snmp 13 | - git checkout 14 | - cd integration_tests 15 | - sudo ./install_microk8s.sh 16 | - su 17 | - cd ~/splunk-connect-for-snmp/integration_tests 18 | - ./automatic_setup.sh 19 | 20 | Run with terraform and ansible. Use local_run.sh script. It has some prerequisites - AWS env variables and 21 | ansible, terraform commands. It will return error and information if you are missing something. You should 22 | define env variables in set_env.sh script. It is sourced in local_run.sh. To execute: 23 | - ./local_run.sh 24 | -------------------------------------------------------------------------------- /integration_tests/README_WALK: -------------------------------------------------------------------------------- 1 | git clone https://github.com/splunk/splunk-connect-for-snmp.git 2 | cd splunk-connect-for-snmp 3 | git checkout 4 | curl -sSL https://install.python-poetry.org | python - 5 | poetry install 6 | 7 | 8 | If you want to walk SNMP V3 device place "test" value as secret in inventory.csv, copy sample_v3_values from integration tests 9 | into working directory, rename to secrets and edit 7 filed under secrets/snmpv3/test directory 10 | 11 | poetry run run-walk -------------------------------------------------------------------------------- /integration_tests/__init__.py: -------------------------------------------------------------------------------- 1 | # ######################################################################## 2 | # Copyright 2021 Splunk Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ######################################################################## 16 | -------------------------------------------------------------------------------- /integration_tests/install_microk8s.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | setup_kube_roles() { 4 | sudo usermod -a -G microk8s "$USER" 5 | sudo chown -f -R "$USER" ~/.kube 6 | echo "In order to properly configure Kubernetes, we need to logout the current shell. You might need to enter you password." 7 | su - "$USER" 8 | } 9 | 10 | install_dependencies_on_ubuntu() { 11 | sudo snap install microk8s --classic --channel=1.30/stable 12 | sudo snap install docker 13 | sudo apt-get install snmp -y 14 | sudo apt-get install python3-dev -y 15 | } 16 | 17 | install_dependencies_on_centos() { 18 | sudo yum -y install epel-release 19 | sudo yum -y install snapd 20 | sudo systemctl enable snapd 21 | sudo systemctl start snapd 22 | sudo ln -s /var/lib/snapd/snap /snap 23 | sudo snap install microk8s --classic 24 | sudo snap install docker 25 | sudo yum install net-snmp net-snmp-utils -y 26 | sudo yum install python3-devel -y 27 | } 28 | 29 | install_dependencies() { 30 | os_release=/etc/os-release 31 | if [ ! -f "$os_release" ] ; then 32 | echo "$os_release does not exist" 33 | exit 4 34 | fi 35 | 36 | os_version=$(grep "^ID=" "$os_release" | sed -e "s/\"//g" | cut -d= -f2) 37 | if [ "$os_version" == "ubuntu" ] ; then 38 | install_dependencies_on_ubuntu 39 | elif [ "$os_version" == "centos" ] ; then 40 | install_dependencies_on_centos 41 | else 42 | echo "Unsupported operating system: $os_version" 43 | exit 4 44 | fi 45 | 46 | if [ -z "${ANSIBLE_RUN}" ]; then 47 | setup_kube_roles 48 | fi 49 | } 50 | 51 | install_dependencies 52 | -------------------------------------------------------------------------------- /integration_tests/install_sck.sh: -------------------------------------------------------------------------------- 1 | sudo microk8s helm3 repo add splunk-otel-collector-chart https://signalfx.github.io/splunk-otel-collector-chart 2 | sudo microk8s helm3 upgrade --install sck \ 3 | --set="clusterName=my-cluster" \ 4 | --set="splunkPlatform.endpoint=https://$(hostname -I | cut -d " " -f1):8088/services/collector" \ 5 | --set="splunkPlatform.insecureSkipVerify=true" \ 6 | --set="splunkPlatform.token=$(cat hec_token)" \ 7 | --set="splunkPlatform.metricsEnabled=true" \ 8 | --set="splunkPlatform.metricsIndex=em_metrics" \ 9 | --set="splunkPlatform.index=em_logs" \ 10 | splunk-otel-collector-chart/splunk-otel-collector 11 | -------------------------------------------------------------------------------- /integration_tests/inventory-tests.csv: -------------------------------------------------------------------------------- 1 | address,port,version,community,secret,security_engine,walk_interval,profiles,smart_profiles,delete 2 | ###LOAD_BALANCER_ID###,,2c,public,,,600,,, -------------------------------------------------------------------------------- /integration_tests/prepare_splunk.sh: -------------------------------------------------------------------------------- 1 | create_splunk_indexes() { 2 | index_names=("netmetrics" "em_metrics" "netops" "em_logs") 3 | index_types=("metric" "metric" "event" "event") 4 | for index in "${!index_names[@]}" ; do 5 | if ! curl -k -u admin:"changeme2" "https://localhost:8089/services/data/indexes" \ 6 | -d datatype="${index_types[${index}]}" -d name="${index_names[${index}]}" ; then 7 | echo "Error when creating ${index_names[${index}]} of type ${index_types[${index}]}" 8 | fi 9 | done 10 | } 11 | 12 | create_splunk_hec() { 13 | if ! curl -k -u admin:changeme2 https://localhost:8089/servicesNS/admin/splunk_httpinput/data/inputs/http -d name=some_name | grep "token" | cut -c 29-64 > hec_token ; then 14 | echo "Error when creating ${index_names[${index}]} of type ${index_types[${index}]}" 15 | fi 16 | } 17 | 18 | change_min_free_space() { 19 | DOCKER_ID=$(sudo docker ps | grep 'splunk/splunk:latest' | awk '{ print $1 }') 20 | sudo docker exec --user splunk "$DOCKER_ID" bash -c "echo -e '\n[diskUsage]\nminFreeSpace = 2000' >> /opt/splunk/etc/system/local/server.conf" 21 | curl -k -u admin:changeme2 https://localhost:8089/services/server/control/restart -X POST 22 | sleep 60 23 | } 24 | 25 | change_min_free_space 26 | create_splunk_indexes 27 | create_splunk_hec 28 | -------------------------------------------------------------------------------- /integration_tests/sample_v3_values/snmpv3/test/authKey: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/integration_tests/sample_v3_values/snmpv3/test/authKey -------------------------------------------------------------------------------- /integration_tests/sample_v3_values/snmpv3/test/authKeyType: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/integration_tests/sample_v3_values/snmpv3/test/authKeyType -------------------------------------------------------------------------------- /integration_tests/sample_v3_values/snmpv3/test/authProtocol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/integration_tests/sample_v3_values/snmpv3/test/authProtocol -------------------------------------------------------------------------------- /integration_tests/sample_v3_values/snmpv3/test/privKey: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/integration_tests/sample_v3_values/snmpv3/test/privKey -------------------------------------------------------------------------------- /integration_tests/sample_v3_values/snmpv3/test/privKeyType: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/integration_tests/sample_v3_values/snmpv3/test/privKeyType -------------------------------------------------------------------------------- /integration_tests/sample_v3_values/snmpv3/test/privProtocol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/integration_tests/sample_v3_values/snmpv3/test/privProtocol -------------------------------------------------------------------------------- /integration_tests/sample_v3_values/snmpv3/test/userName: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/splunk/splunk-connect-for-snmp/2c2473cf6e302d1139e7c268c351ea9553737c96/integration_tests/sample_v3_values/snmpv3/test/userName -------------------------------------------------------------------------------- /integration_tests/scheduler-config.yaml: -------------------------------------------------------------------------------- 1 | communities: 2 | 2c: 3 | public: 4 | customTranslations: 5 | IP-MIB: 6 | icmpOutEchoReps: myCustomName1 7 | profiles: 8 | small_walk: 9 | condition: 10 | type: "walk" 11 | varBinds: 12 | - [ 'IP-MIB' ] 13 | - [ 'IF-MIB' ] 14 | - [ 'TCP-MIB' ] 15 | - [ 'UDP-MIB' ] 16 | groups: {} 17 | -------------------------------------------------------------------------------- /integration_tests/scripts/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | host_key_checking = False 3 | stdout_callback = debug 4 | inventory=./inventory.yaml 5 | 6 | [ssh_connection] 7 | retries=3 8 | pipelining=False 9 | ssh_args = -C -o ControlMaster=auto -o ControlPersist=30m 10 | -------------------------------------------------------------------------------- /integration_tests/scripts/inventory.tmpl: -------------------------------------------------------------------------------- 1 | snmp_machine: 2 | hosts: 3 | machine: 4 | ansible_host: ${ip} 5 | vars: 6 | ansible_ssh_user: ubuntu 7 | ansible_ssh_private_key_file: ${ssh_keyfile} 8 | -------------------------------------------------------------------------------- /integration_tests/scripts/result_analyzer.py: -------------------------------------------------------------------------------- 1 | from junitparser import JUnitXml 2 | 3 | xml = JUnitXml.fromfile("./result.xml") 4 | 5 | for suite in xml: 6 | assert suite.tests > 0, "Suite does not contain any tests" 7 | assert suite.errors == 0, "Some errors detected in test results" 8 | assert suite.failures == 0, "Some failures detected in test results" 9 | assert suite.skipped == 0, "Some tests were skipped" 10 | 11 | print("All tests PASSED") 12 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/bgp.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.1.4.192.168.1.1|4x|686f6c642074696d652065787069726564 2 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.1.4.192.168.1.2|4x|686f6c642074696d652065787069726564 3 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.1.4.192.168.1.3|4x|7065657220756e636f6e66696775726564 4 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.1.4.192.168.1.4|4x|686f6c642074696d652065787069726564 5 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.1.4.192.168.1.5|4x|686f6c642074696d652065787069726564 6 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.1.4.192.168.1.6|4x|686f6c642074696d652065787069726564 7 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.1.4.192.168.1.7|4x|7065657220756e636f6e66696775726564 8 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.1.4.192.168.1.8|4x|7065657220756e636f6e66696775726564 9 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.1.4.192.168.1.9|4x|7065657220756e636f6e66696775726564 10 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.1.4.192.168.1.10|4x|61646d696e6973747261746976652073687574646f776e 11 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.2.16.42.1.72.96.0.1.0.1.0.0.0.0.0.0.0.100|4x|7065657220756e636f6e66696775726564 12 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.2.16.42.1.72.96.0.1.0.1.0.0.0.0.0.0.0.101|4x|686f6c642074696d652065787069726564 13 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.2.16.42.1.72.96.0.1.0.1.0.0.0.0.0.0.0.102|4x|686f6c642074696d652065787069726564 14 | 1.3.6.1.4.1.9.9.187.1.2.5.1.28.2.16.42.1.72.96.0.1.0.1.0.0.0.0.0.0.0.103|4x|686f6c642074696d652065787069726564 15 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/mib2dev/tcp-mib.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.6.1.0|2|1 2 | 1.3.6.1.2.1.6.2.0|2|4 3 | 1.3.6.1.2.1.6.3.0|2|2 4 | 1.3.6.1.2.1.6.4.0|2|4 5 | 1.3.6.1.2.1.6.5.0|65|1662058536 6 | 1.3.6.1.2.1.6.6.0|65|2028504670 7 | 1.3.6.1.2.1.6.7.0|65|2288312282 8 | 1.3.6.1.2.1.6.8.0|65|4004255424 9 | 1.3.6.1.2.1.6.9.0|66|4025272842 10 | 1.3.6.1.2.1.6.10.0|65|3255638859 11 | 1.3.6.1.2.1.6.11.0|65|1489319358 12 | 1.3.6.1.2.1.6.12.0|65|749604405 13 | 1.3.6.1.2.1.6.13.1.1.72.192.51.208.2.234.233.215.7.3|2|1 14 | 1.3.6.1.2.1.6.13.1.2.72.192.51.208.2.234.233.215.7.3|64x|8b896863 15 | 1.3.6.1.2.1.6.13.1.3.72.192.51.208.2.234.233.215.7.3|2|3 16 | 1.3.6.1.2.1.6.13.1.4.72.192.51.208.2.234.233.215.7.3|64x|4f1182fe 17 | 1.3.6.1.2.1.6.13.1.5.72.192.51.208.2.234.233.215.7.3|2|3 18 | 1.3.6.1.2.1.6.14.0|65|2597920355 19 | 1.3.6.1.2.1.6.15.0|65|4033500253 20 | 1.3.6.1.2.1.6.17.0|70|6872960564629597274 21 | 1.3.6.1.2.1.6.18.0|70|5530204217969443411 22 | 1.3.6.1.2.1.6.19.1.1.2.0.768.3.0.768|2|3 23 | 1.3.6.1.2.1.6.19.1.2.2.0.768.3.0.768|4|whisky au juge blond 24 | 1.3.6.1.2.1.6.19.1.3.2.0.768.3.0.768|66|422 25 | 1.3.6.1.2.1.6.19.1.4.2.0.768.3.0.768|2|1 26 | 1.3.6.1.2.1.6.19.1.5.2.0.768.3.0.768|4| 27 | 1.3.6.1.2.1.6.19.1.6.2.0.768.3.0.768|66|844 28 | 1.3.6.1.2.1.6.19.1.7.2.0.768.3.0.768|2|3 29 | 1.3.6.1.2.1.6.19.1.8.2.0.768.3.0.768|66|3360701264 30 | 1.3.6.1.2.1.6.20.1.1.2.0.432|2|1 31 | 1.3.6.1.2.1.6.20.1.2.2.0.432|4| 32 | 1.3.6.1.2.1.6.20.1.3.2.0.432|66|80 33 | 1.3.6.1.2.1.6.20.1.4.2.0.432|66|1524968792 34 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/mib2dev/udp-mib.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.7.1.0|65|2227133058 2 | 1.3.6.1.2.1.7.2.0|65|2937178585 3 | 1.3.6.1.2.1.7.3.0|65|1729892225 4 | 1.3.6.1.2.1.7.4.0|65|3771766783 5 | 1.3.6.1.2.1.7.5.1.1.8.185.250.193.1|64x|9cd2059e 6 | 1.3.6.1.2.1.7.5.1.2.8.185.250.193.1|2|4 7 | 1.3.6.1.2.1.7.7.1.1.2.0.100.3.0.123.990022909|2|3 8 | 1.3.6.1.2.1.7.7.1.2.2.0.100.3.0.123.990022909|4|whisky au juge blond qui 9 | 1.3.6.1.2.1.7.7.1.3.2.0.100.3.0.123.990022909|66|422 10 | 1.3.6.1.2.1.7.7.1.4.2.0.100.3.0.123.990022909|2|1 11 | 1.3.6.1.2.1.7.7.1.5.2.0.100.3.0.123.990022909|4| 12 | 1.3.6.1.2.1.7.7.1.6.2.0.100.3.0.123.990022909|66|322 13 | 1.3.6.1.2.1.7.7.1.7.2.0.100.3.0.123.990022909|66|942640476 14 | 1.3.6.1.2.1.7.7.1.8.2.0.100.3.0.123.990022909|66|543812974 15 | 1.3.6.1.2.1.7.8.0|70|3896031866066683889 16 | 1.3.6.1.2.1.7.9.0|70|3518073560493506800 17 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/public/1.3.6.1.2.1.100.1.2.0/__1.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.6.16.1.1.55.51.50.55.50.52.52.56.56.51.57.50.52.55.51.50.434.55.51.50.55.50.52.52.56.56.51.57.50.52.55.52.51.64.1853700339|4|7327244883929832 2 | 1.3.6.1.2.1.6.16.1.2.55.51.50.55.50.52.52.56.56.51.57.50.52.55.51.50.434.55.51.50.55.50.52.52.56.56.51.57.50.52.55.52.51.64.1853700339|2|89 3 | 1.3.6.1.2.1.6.16.1.3.55.51.50.55.50.52.52.56.56.51.57.50.52.55.51.50.434.55.51.50.55.50.52.52.56.56.51.57.50.52.55.52.51.64.1853700339|4|7327244883924545 4 | 1.3.6.1.2.1.6.16.1.4.55.51.50.55.50.52.52.56.56.51.57.50.52.55.51.50.434.55.51.50.55.50.52.52.56.56.51.57.50.52.55.52.51.64.1853700339|2|87 5 | 1.3.6.1.2.1.6.16.1.5.55.51.50.55.50.52.52.56.56.51.57.50.52.55.51.50.434.55.51.50.55.50.52.52.56.56.51.57.50.52.55.52.51.64.1853700339|2|402562730 6 | 1.3.6.1.2.1.6.16.1.6.55.51.50.55.50.52.52.56.56.51.57.50.52.55.51.50.434.55.51.50.55.50.52.52.56.56.51.57.50.52.55.52.51.64.1853700339|2|10 7 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/recorded/linksys-system.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.1.1.0|4|BEFSX41 2 | 1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.3955.1.1 3 | 1.3.6.1.2.1.1.3.0|67|638239 4 | 1.3.6.1.2.1.1.4.0|4|Linksys 5 | 1.3.6.1.2.1.1.5.0|4|isp-gw 6 | 1.3.6.1.2.1.1.6.0|4|4, Petersburger strasse, Berlin, Germany 7 | 1.3.6.1.2.1.1.8.0|67|4 8 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/recorded/solaris-system.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.1.1.0|4|Sun SNMP Agent, Sun-Blade-100 2 | 1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.42.2.1.1 3 | 1.3.6.1.2.1.1.3.0|67|624162552 4 | 1.3.6.1.2.1.1.4.0|4|System administrator 5 | 1.3.6.1.2.1.1.5.0|4|oss 6 | 1.3.6.1.2.1.1.6.0|4|System administrators office 7 | 1.3.6.1.2.1.1.8.0|67|72 8 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/recorded/udp-endpoint-table-walk.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.37.1.4.0.0.0.0.0.13480|66|0 2 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.111.1.4.0.0.0.0.0.13348|66|0 3 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.123.1.4.0.0.0.0.0.13701|66|0 4 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.161.1.4.0.0.0.0.0.17521|66|0 5 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.512.1.4.0.0.0.0.0.13481|66|0 6 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.631.1.4.0.0.0.0.0.16954|66|0 7 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.665.1.4.0.0.0.0.0.13621|66|0 8 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.978.1.4.0.0.0.0.0.13380|66|0 9 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.2049.1.4.0.0.0.0.0.13649|66|0 10 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.32768.1.4.0.0.0.0.0.13386|66|0 11 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.32769.1.4.0.0.0.0.0.13645|66|0 12 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.32770.1.4.0.0.0.0.0.13671|66|0 13 | 1.3.6.1.2.1.7.7.1.8.1.4.0.0.0.0.45639.1.4.0.0.0.0.0.26306447|66|0 14 | 1.3.6.1.2.1.7.7.1.8.1.4.127.0.0.1.53.1.4.0.0.0.0.0.13528|66|0 15 | 1.3.6.1.2.1.7.7.1.8.1.4.127.0.0.1.123.1.4.0.0.0.0.0.13706|66|0 16 | 1.3.6.1.2.1.7.7.1.8.1.4.195.218.254.105.53.1.4.0.0.0.0.0.13530|66|0 17 | 1.3.6.1.2.1.7.7.1.8.1.4.195.218.254.105.123.1.4.0.0.0.0.0.13707|66|0 18 | 1.3.6.1.2.1.7.7.1.8.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.123.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.13702|66|0 19 | 1.3.6.1.2.1.7.7.1.8.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.123.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.13704|66|0 20 | 1.3.6.1.2.1.7.7.1.8.2.16.254.128.0.0.0.0.0.0.2.18.121.255.254.98.249.64.123.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.13705|66|0 21 | 1.3.6.1.2.1.11.1.0|65|55925 22 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/variation/delay.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.2.2.1.1.1|2:delay|value=1 2 | 1.3.6.1.2.1.2.2.1.2.1|4:delay|value=eth0 3 | 1.3.6.1.2.1.2.2.1.3.1|2:delay|value=6,wait=100,deviation=200 4 | 1.3.6.1.2.1.2.2.1.5.1|66:delay|value=100000000 5 | 1.3.6.1.2.1.2.2.1.6.1|4:delay|hexvalue=00127962f940,wait=800 6 | 1.3.6.1.2.1.2.2.1.7.1|2:delay|wait=1,value=0 7 | 1.3.6.1.2.1.2.2.1.8.1|2:delay|vlist=eq:0:100:eq:1:1000,value=1 8 | 1.3.6.1.2.1.2.2.1.9.1|67:delay|vlist=lt:100:1:gt:300:1000000,value=150 9 | 1.3.6.1.2.1.2.2.1.10.1|65:delay|tlist=gt:1364860800:1000000,value=12345 10 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/variation/error.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.2.2.1.1.1|2:error|op=get,status=authorizationError,value=1 2 | 1.3.6.1.2.1.2.2.1.2.1|4:error|op=set,status=commitfailed,hexvalue=00127962f940 3 | 1.3.6.1.2.1.2.2.1.3.1|2:error|vlist=gt:2:wrongvalue,value=1 4 | 1.3.6.1.2.1.2.2.1.6.1|4:error|status=noaccess 5 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/variation/multiplex.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.2|:multiplex|dir=variation/multiplex,period=10.0 2 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/variation/notification.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.1.1.0|4:notification|op=get,version=1,community=public,proto=udp,host=127.0.0.1,port=162,ntftype=trap,trapoid=1.3.6.1.4.1.20408.4.1.1.2.0.432,uptime=12345,agentaddress=127.0.0.1,enterprise=1.3.6.1.4.1.20408.4.1.1.2,varbinds=1.3.6.1.2.1.1.1.0:s:snmpsim agent:1.3.6.1.2.1.1.3.0:i:42,value=SNMPv1 trap sender 2 | 1.3.6.1.2.1.1.2.0|6:notification|op=set,vlist=eq:1.3.6.1.1.2,version=2c,community=public,bindaddr=127.0.0.1,host=127.0.0.1,ntftype=trap,trapoid=1.3.6.1.6.3.1.1.5.1,varbinds=1.3.6.1.2.1.1.1.0:s:snmpsim agent:1.3.6.1.2.1.1.3.0:i:42,value=1.3.6.1.1.1 3 | 1.3.6.1.2.1.1.3.0|67:notification|version=3,user=usr-md5-des,authkey=authkey1,privkey=privkey1,host=127.0.0.1,ntftype=inform,trapoid=1.3.6.1.6.3.1.1.5.2,value=123456 4 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/variation/sql.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1|:sql|snmprec 2 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/variation/subprocess.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.1.1.0|4:subprocess|echo SNMP info: transportDomain @TRANSPORTDOMAIN@, transportAddress @TRANSPORTADDRESS@, securityModel @SECURITYMODEL@, securityName @SECURITYNAME@, securityLevel @SECURITYLEVEL@, contextName @CONTEXTNAME@\r\nUsing data file @DATAFILE@\r\nReceived request for @ORIGOID@, matched @OID@, received tag/value "@ORIGTAG@"/"@ORIGVALUE@", would return value tagged @TAG@, request write mode flag is @SETFLAG@, next flag is @NEXTFLAG@, subtree flag is @SUBTREEFLAG@ 2 | 1.3.6.1.2.1.1.3.0|2:subprocess|echo 123455 3 | 1.3.6.1.2.1.1.5.0|4|new system name 4 | -------------------------------------------------------------------------------- /integration_tests/snmpsim/data/variation/virtualtable.snmprec: -------------------------------------------------------------------------------- 1 | 1.3.6.1.2.1.2.2.1.1.1|2|1 2 | 1.3.6.1.2.1.2.2.1.2.1|4|eth0 3 | 1.3.6.1.2.1.2.2.1.3.1|2|6 4 | 1.3.6.1.2.1.2.2.1.4.1|2|1500 5 | 1.3.6.1.2.1.2.2.1.5.1|66|100000000 6 | 1.3.6.1.2.1.2.2.1.6.1|4x|00127962f940 7 | 1.3.6.1.2.1.2.2.1.7.1|2|1 8 | 1.3.6.1.2.1.2.2.1.8.1|2|1 9 | 1.3.6.1.2.1.2.2.1.9.1|67:numeric|rate=100,initial=100000000 10 | 1.3.6.1.2.1.2.2.1.10.1|65:numeric|rate=200,deviation=10,cumulative=1 11 | 1.3.6.1.2.1.2.2.1.11.1|65:numeric|rate=18,initial=1,cumulative=1 12 | 1.3.6.1.2.1.2.2.1.12.1|65:numeric|rate=2,cumulative=1 13 | 1.3.6.1.2.1.2.2.1.13.1|65:numeric|scale=0.6,offset=1,deviation=1,function=cos,cumulative=1 14 | 1.3.6.1.2.1.2.2.1.14.1|65:numeric|scale=0.4,offset=1,deviation=1,function=sin,cumulative=1 15 | 1.3.6.1.2.1.2.2.1.15.1|65:numeric|rate=0.1,deviation=2,cumulative=1 16 | 1.3.6.1.2.1.2.2.1.16.1|65:numeric|rate=100,deviation=5,cumulative=1 17 | 1.3.6.1.2.1.2.2.1.17.1|65:numeric|rate=9,initial=1,cumulative=1 18 | 1.3.6.1.2.1.2.2.1.18.1|65:numeric|rate=1,cumulative=1 19 | 1.3.6.1.2.1.2.2.1.19.1|65:numeric|scale=0.6,offset=1,deviation=1,function=sin,cumulative=1 20 | 1.3.6.1.2.1.2.2.1.20.1|65:numeric|scale=0.4,offset=1,deviation=1,function=cos,cumulative=1 21 | 1.3.6.1.2.1.2.2.1.21.1|66:numeric|function=pow%