solnlib 5.1.2__tar.gz → 5.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {solnlib-5.1.2 → solnlib-5.2.0}/PKG-INFO +1 -1
  2. {solnlib-5.1.2 → solnlib-5.2.0}/pyproject.toml +1 -1
  3. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/__init__.py +1 -1
  4. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/log.py +6 -2
  5. {solnlib-5.1.2 → solnlib-5.2.0}/LICENSE +0 -0
  6. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/_utils.py +0 -0
  7. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/acl.py +0 -0
  8. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/bulletin_rest_client.py +0 -0
  9. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/conf_manager.py +0 -0
  10. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/credentials.py +0 -0
  11. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/file_monitor.py +0 -0
  12. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/hec_config.py +0 -0
  13. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/modular_input/__init__.py +0 -0
  14. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/modular_input/checkpointer.py +0 -0
  15. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/modular_input/event.py +0 -0
  16. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/modular_input/event_writer.py +0 -0
  17. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/modular_input/modular_input.py +0 -0
  18. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/net_utils.py +0 -0
  19. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/orphan_process_monitor.py +0 -0
  20. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/pattern.py +0 -0
  21. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/server_info.py +0 -0
  22. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/splunk_rest_client.py +0 -0
  23. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/splunkenv.py +0 -0
  24. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/time_parser.py +0 -0
  25. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/timer_queue.py +0 -0
  26. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/user_access.py +0 -0
  27. {solnlib-5.1.2 → solnlib-5.2.0}/solnlib/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: solnlib
3
- Version: 5.1.2
3
+ Version: 5.2.0
4
4
  Summary: The Splunk Software Development Kit for Splunk Solutions
5
5
  Home-page: https://github.com/splunk/addonfactory-solutions-library-python
6
6
  License: Apache-2.0
@@ -16,7 +16,7 @@
16
16
 
17
17
  [tool.poetry]
18
18
  name = "solnlib"
19
- version = "5.1.2"
19
+ version = "5.2.0"
20
20
  description = "The Splunk Software Development Kit for Splunk Solutions"
21
21
  authors = ["Splunk <addonfactory@splunk.com>"]
22
22
  license = "Apache-2.0"
@@ -56,4 +56,4 @@ __all__ = [
56
56
  "utils",
57
57
  ]
58
58
 
59
- __version__ = "5.1.2"
59
+ __version__ = "5.2.0"
@@ -79,7 +79,7 @@ class Logs(metaclass=Singleton):
79
79
  _default_directory = None
80
80
  _default_namespace = None
81
81
  _default_log_format = (
82
- "%(asctime)s %(levelname)s pid=%(process)d tid=%(threadName)s "
82
+ "%(asctime)s log_level=%(levelname)s pid=%(process)d tid=%(threadName)s "
83
83
  "file=%(filename)s:%(funcName)s:%(lineno)d | %(message)s"
84
84
  )
85
85
  _default_log_level = logging.INFO
@@ -285,6 +285,7 @@ def events_ingested(
285
285
  index: str,
286
286
  account: str = None,
287
287
  host: str = None,
288
+ license_usage_source: str = None,
288
289
  ):
289
290
  """Specific function to log the basic information of events ingested for
290
291
  the monitoring dashboard.
@@ -296,6 +297,7 @@ def events_ingested(
296
297
  sourcetype: Source type used to write event.
297
298
  n_events: Number of ingested events.
298
299
  index: Index used to write event.
300
+ license_usage_source: source used to match data with license_usage.log.
299
301
  account: Account used to write event. (optional)
300
302
  host: Host used to write event. (optional)
301
303
  """
@@ -310,7 +312,9 @@ def events_ingested(
310
312
 
311
313
  result = {
312
314
  "action": "events_ingested",
313
- "modular_input_name": modular_input_name,
315
+ "modular_input_name": license_usage_source
316
+ if license_usage_source
317
+ else modular_input_name,
314
318
  "sourcetype_ingested": sourcetype,
315
319
  "n_events": n_events,
316
320
  "event_input": input_name,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes