pandoraPlugintools-basic 1.0.0__tar.gz → 1.0.2__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.
- pandoraplugintools_basic-1.0.2/PKG-INFO +113 -0
- pandoraplugintools_basic-1.0.2/README.md +96 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/agents.py +5 -1
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/modules.py +43 -0
- pandoraplugintools_basic-1.0.2/pandoraPlugintools_basic.egg-info/PKG-INFO +113 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/setup.cfg +1 -1
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/setup.py +1 -1
- pandoraplugintools_basic-1.0.0/PKG-INFO +0 -93
- pandoraplugintools_basic-1.0.0/README.md +0 -76
- pandoraplugintools_basic-1.0.0/pandoraPlugintools_basic.egg-info/PKG-INFO +0 -93
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/LICENSE +0 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/__init__.py +0 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/discovery.py +0 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/general.py +0 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/output.py +0 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/threads.py +0 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/transfer.py +0 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools_basic.egg-info/SOURCES.txt +0 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools_basic.egg-info/dependency_links.txt +0 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools_basic.egg-info/top_level.txt +0 -0
- {pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/tests/test_basic.py +0 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pandoraPlugintools-basic
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: A plugin tool set of basic functions for pandorafms
|
|
5
|
+
Home-page: https://github.com/pandorafms/pandoraPlugintoolsBasic
|
|
6
|
+
Author: PandoraFMS projects department
|
|
7
|
+
Author-email: <info@pandorafms.com>
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Dynamic: author
|
|
11
|
+
Dynamic: author-email
|
|
12
|
+
Dynamic: description
|
|
13
|
+
Dynamic: description-content-type
|
|
14
|
+
Dynamic: home-page
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
Dynamic: summary
|
|
17
|
+
|
|
18
|
+
# pandoraPlugintoolsBasic
|
|
19
|
+
|
|
20
|
+
`pandoraPlugintoolsBasic` is a lightweight, dependency-free version of `pandoraPlugintools` for Pandora FMS plugin development.
|
|
21
|
+
|
|
22
|
+
It is designed as a drop-in replacement for the most commonly used functionality, with a smaller footprint and simpler deployment.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install pandoraPlugintools-basic
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Migration from pandoraPlugintools
|
|
31
|
+
|
|
32
|
+
If your plugin only uses the basic features included in this package, migrate with:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip uninstall pandoraPlugintools
|
|
36
|
+
pip install pandoraPlugintools-basic
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Important:
|
|
40
|
+
- This package does not include all features from the full `pandoraPlugintools` package.
|
|
41
|
+
- If your current code depends on advanced modules (for example SNMP or encryption helpers), keep using the standard package.
|
|
42
|
+
|
|
43
|
+
## What is included
|
|
44
|
+
|
|
45
|
+
The package exports the following modules:
|
|
46
|
+
|
|
47
|
+
- `general`: General-purpose helper functions for plugin development.
|
|
48
|
+
- `threads`: Utilities for running functions in parallel.
|
|
49
|
+
- `agents`: Functions to build Pandora FMS agent payloads.
|
|
50
|
+
- `modules`: Functions to build Pandora FMS module payloads.
|
|
51
|
+
- `transfer`: File transfer and data sending helpers.
|
|
52
|
+
- `discovery`: Helpers for Pandora FMS discovery plugins.
|
|
53
|
+
- `output`: Output formatting and return helpers.
|
|
54
|
+
|
|
55
|
+
Reference documentation:
|
|
56
|
+
[PluginTools Reference Documentation](https://pandorafms.com/guides/public/books/plugintools)
|
|
57
|
+
|
|
58
|
+
## Most used functions
|
|
59
|
+
|
|
60
|
+
The README stays focused on the quick path. For a complete function list and full details, use the reference documentation link above.
|
|
61
|
+
|
|
62
|
+
| Module | Common functions |
|
|
63
|
+
|-------|------------------|
|
|
64
|
+
| `general` | `generate_md5`, `safe_input`, `safe_output`, `parse_configuration`, `parse_csv_file`, `translate_macros`, `now` |
|
|
65
|
+
| `agents` | `init_agent`, `print_agent`, `get_os` |
|
|
66
|
+
| `modules` | `init_module`, `print_module`, `init_log_module`, `print_log_module` |
|
|
67
|
+
| `transfer` | `write_xml`, `transfer_xml`, `tentacle_xml` |
|
|
68
|
+
| `threads` | `run_threads`, `run_processes`, `set_shared_dict_value`, `get_shared_dict_value` |
|
|
69
|
+
| `discovery` | `set_disco_summary`, `add_disco_summary_value`, `add_disco_info_value`, `add_disco_monitoring_data`, `disco_output` |
|
|
70
|
+
| `output` | `print_stdout`, `print_stderr`, `print_debug`, `logger` |
|
|
71
|
+
|
|
72
|
+
## Quick example
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
import pandoraPlugintools as ppt
|
|
76
|
+
|
|
77
|
+
# Define agent
|
|
78
|
+
server_name = "WIN-SERV"
|
|
79
|
+
|
|
80
|
+
agent = ppt.init_agent(
|
|
81
|
+
{
|
|
82
|
+
"agent_name": ppt.generate_md5(server_name),
|
|
83
|
+
"agent_alias": server_name,
|
|
84
|
+
"description": "Default Windows server",
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
# Define modules
|
|
89
|
+
modules = []
|
|
90
|
+
data = 10
|
|
91
|
+
|
|
92
|
+
modules.append(
|
|
93
|
+
{
|
|
94
|
+
"name": "CPU usage",
|
|
95
|
+
"type": "generic_data",
|
|
96
|
+
"value": data,
|
|
97
|
+
"desc": "Percentage of CPU utilization",
|
|
98
|
+
"unit": "%",
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Generate and transfer XML
|
|
103
|
+
xml_content = ppt.print_agent(agent, modules)
|
|
104
|
+
xml_file = ppt.write_xml(xml_content, agent["agent_name"])
|
|
105
|
+
|
|
106
|
+
ppt.transfer_xml(
|
|
107
|
+
xml_file,
|
|
108
|
+
transfer_mode="tentacle",
|
|
109
|
+
tentacle_ip="192.168.1.20",
|
|
110
|
+
tentacle_port="41121",
|
|
111
|
+
)
|
|
112
|
+
```
|
|
113
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# pandoraPlugintoolsBasic
|
|
2
|
+
|
|
3
|
+
`pandoraPlugintoolsBasic` is a lightweight, dependency-free version of `pandoraPlugintools` for Pandora FMS plugin development.
|
|
4
|
+
|
|
5
|
+
It is designed as a drop-in replacement for the most commonly used functionality, with a smaller footprint and simpler deployment.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install pandoraPlugintools-basic
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Migration from pandoraPlugintools
|
|
14
|
+
|
|
15
|
+
If your plugin only uses the basic features included in this package, migrate with:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip uninstall pandoraPlugintools
|
|
19
|
+
pip install pandoraPlugintools-basic
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Important:
|
|
23
|
+
- This package does not include all features from the full `pandoraPlugintools` package.
|
|
24
|
+
- If your current code depends on advanced modules (for example SNMP or encryption helpers), keep using the standard package.
|
|
25
|
+
|
|
26
|
+
## What is included
|
|
27
|
+
|
|
28
|
+
The package exports the following modules:
|
|
29
|
+
|
|
30
|
+
- `general`: General-purpose helper functions for plugin development.
|
|
31
|
+
- `threads`: Utilities for running functions in parallel.
|
|
32
|
+
- `agents`: Functions to build Pandora FMS agent payloads.
|
|
33
|
+
- `modules`: Functions to build Pandora FMS module payloads.
|
|
34
|
+
- `transfer`: File transfer and data sending helpers.
|
|
35
|
+
- `discovery`: Helpers for Pandora FMS discovery plugins.
|
|
36
|
+
- `output`: Output formatting and return helpers.
|
|
37
|
+
|
|
38
|
+
Reference documentation:
|
|
39
|
+
[PluginTools Reference Documentation](https://pandorafms.com/guides/public/books/plugintools)
|
|
40
|
+
|
|
41
|
+
## Most used functions
|
|
42
|
+
|
|
43
|
+
The README stays focused on the quick path. For a complete function list and full details, use the reference documentation link above.
|
|
44
|
+
|
|
45
|
+
| Module | Common functions |
|
|
46
|
+
|-------|------------------|
|
|
47
|
+
| `general` | `generate_md5`, `safe_input`, `safe_output`, `parse_configuration`, `parse_csv_file`, `translate_macros`, `now` |
|
|
48
|
+
| `agents` | `init_agent`, `print_agent`, `get_os` |
|
|
49
|
+
| `modules` | `init_module`, `print_module`, `init_log_module`, `print_log_module` |
|
|
50
|
+
| `transfer` | `write_xml`, `transfer_xml`, `tentacle_xml` |
|
|
51
|
+
| `threads` | `run_threads`, `run_processes`, `set_shared_dict_value`, `get_shared_dict_value` |
|
|
52
|
+
| `discovery` | `set_disco_summary`, `add_disco_summary_value`, `add_disco_info_value`, `add_disco_monitoring_data`, `disco_output` |
|
|
53
|
+
| `output` | `print_stdout`, `print_stderr`, `print_debug`, `logger` |
|
|
54
|
+
|
|
55
|
+
## Quick example
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
import pandoraPlugintools as ppt
|
|
59
|
+
|
|
60
|
+
# Define agent
|
|
61
|
+
server_name = "WIN-SERV"
|
|
62
|
+
|
|
63
|
+
agent = ppt.init_agent(
|
|
64
|
+
{
|
|
65
|
+
"agent_name": ppt.generate_md5(server_name),
|
|
66
|
+
"agent_alias": server_name,
|
|
67
|
+
"description": "Default Windows server",
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Define modules
|
|
72
|
+
modules = []
|
|
73
|
+
data = 10
|
|
74
|
+
|
|
75
|
+
modules.append(
|
|
76
|
+
{
|
|
77
|
+
"name": "CPU usage",
|
|
78
|
+
"type": "generic_data",
|
|
79
|
+
"value": data,
|
|
80
|
+
"desc": "Percentage of CPU utilization",
|
|
81
|
+
"unit": "%",
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# Generate and transfer XML
|
|
86
|
+
xml_content = ppt.print_agent(agent, modules)
|
|
87
|
+
xml_file = ppt.write_xml(xml_content, agent["agent_name"])
|
|
88
|
+
|
|
89
|
+
ppt.transfer_xml(
|
|
90
|
+
xml_file,
|
|
91
|
+
transfer_mode="tentacle",
|
|
92
|
+
tentacle_ip="192.168.1.20",
|
|
93
|
+
tentacle_port="41121",
|
|
94
|
+
)
|
|
95
|
+
```
|
|
96
|
+
|
{pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/agents.py
RENAMED
|
@@ -328,6 +328,7 @@ def init_agent(default_values: dict = {}) -> dict:
|
|
|
328
328
|
"group": _GLOBAL_VARIABLES["agents_group_name"],
|
|
329
329
|
"interval": _GLOBAL_VARIABLES["interval"],
|
|
330
330
|
"agent_mode": "1",
|
|
331
|
+
"extra_data": None,
|
|
331
332
|
}
|
|
332
333
|
|
|
333
334
|
for key, value in default_values.items():
|
|
@@ -360,7 +361,7 @@ def print_agent(
|
|
|
360
361
|
Returns:
|
|
361
362
|
str: The XML representation of the agent.
|
|
362
363
|
"""
|
|
363
|
-
from .modules import print_log_module, print_module
|
|
364
|
+
from .modules import print_log_module, print_module, print_img_module
|
|
364
365
|
from .output import print_stdout
|
|
365
366
|
|
|
366
367
|
xml = ""
|
|
@@ -383,6 +384,9 @@ def print_agent(
|
|
|
383
384
|
modules_xml = print_log_module(log_module, encoding=log_encoding)
|
|
384
385
|
xml += str(modules_xml)
|
|
385
386
|
|
|
387
|
+
for image_module in image_modules:
|
|
388
|
+
xml += str(print_img_module(image_module))
|
|
389
|
+
|
|
386
390
|
xml += "</agent_data>"
|
|
387
391
|
|
|
388
392
|
if print_flag:
|
{pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/modules.py
RENAMED
|
@@ -346,3 +346,46 @@ def print_log_module(
|
|
|
346
346
|
|
|
347
347
|
return module_xml
|
|
348
348
|
|
|
349
|
+
####
|
|
350
|
+
# Returns img module in XML format.
|
|
351
|
+
#########################################################################################
|
|
352
|
+
def print_img_module(
|
|
353
|
+
module: dict = None,
|
|
354
|
+
print_flag: bool = False,
|
|
355
|
+
) -> str:
|
|
356
|
+
"""
|
|
357
|
+
Returns image module in XML format. Accepts only {dict}.
|
|
358
|
+
|
|
359
|
+
- Only works with one module at a time: otherwise iteration is needed.
|
|
360
|
+
- The module "value" field must contain a base64-encoded image string.
|
|
361
|
+
- The function automatically prefixes the value with a valid data URI schema for PNG images.
|
|
362
|
+
- Use print_flag to optionally output the generated XML.
|
|
363
|
+
|
|
364
|
+
Args:
|
|
365
|
+
module (dict, optional): Dictionary representing the image module. Expected keys:
|
|
366
|
+
- source (optional, if used by print_module)
|
|
367
|
+
- value (base64 image string)
|
|
368
|
+
print_flag (bool, optional): Flag indicating whether to print the XML. Defaults to False.
|
|
369
|
+
|
|
370
|
+
Returns:
|
|
371
|
+
str: XML representation of the image module with embedded base64 data URI.
|
|
372
|
+
"""
|
|
373
|
+
from .output import print_stdout
|
|
374
|
+
|
|
375
|
+
if module is None:
|
|
376
|
+
return ""
|
|
377
|
+
|
|
378
|
+
data = dict(module)
|
|
379
|
+
|
|
380
|
+
if "value" in data:
|
|
381
|
+
data["value"] = f"data:image/png;base64,{data['value']}"
|
|
382
|
+
|
|
383
|
+
module_xml = print_module(
|
|
384
|
+
module=data,
|
|
385
|
+
print_flag=False
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
if print_flag:
|
|
389
|
+
print_stdout(module_xml)
|
|
390
|
+
|
|
391
|
+
return module_xml
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pandoraPlugintools-basic
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: A plugin tool set of basic functions for pandorafms
|
|
5
|
+
Home-page: https://github.com/pandorafms/pandoraPlugintoolsBasic
|
|
6
|
+
Author: PandoraFMS projects department
|
|
7
|
+
Author-email: <info@pandorafms.com>
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Dynamic: author
|
|
11
|
+
Dynamic: author-email
|
|
12
|
+
Dynamic: description
|
|
13
|
+
Dynamic: description-content-type
|
|
14
|
+
Dynamic: home-page
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
Dynamic: summary
|
|
17
|
+
|
|
18
|
+
# pandoraPlugintoolsBasic
|
|
19
|
+
|
|
20
|
+
`pandoraPlugintoolsBasic` is a lightweight, dependency-free version of `pandoraPlugintools` for Pandora FMS plugin development.
|
|
21
|
+
|
|
22
|
+
It is designed as a drop-in replacement for the most commonly used functionality, with a smaller footprint and simpler deployment.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install pandoraPlugintools-basic
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Migration from pandoraPlugintools
|
|
31
|
+
|
|
32
|
+
If your plugin only uses the basic features included in this package, migrate with:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip uninstall pandoraPlugintools
|
|
36
|
+
pip install pandoraPlugintools-basic
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Important:
|
|
40
|
+
- This package does not include all features from the full `pandoraPlugintools` package.
|
|
41
|
+
- If your current code depends on advanced modules (for example SNMP or encryption helpers), keep using the standard package.
|
|
42
|
+
|
|
43
|
+
## What is included
|
|
44
|
+
|
|
45
|
+
The package exports the following modules:
|
|
46
|
+
|
|
47
|
+
- `general`: General-purpose helper functions for plugin development.
|
|
48
|
+
- `threads`: Utilities for running functions in parallel.
|
|
49
|
+
- `agents`: Functions to build Pandora FMS agent payloads.
|
|
50
|
+
- `modules`: Functions to build Pandora FMS module payloads.
|
|
51
|
+
- `transfer`: File transfer and data sending helpers.
|
|
52
|
+
- `discovery`: Helpers for Pandora FMS discovery plugins.
|
|
53
|
+
- `output`: Output formatting and return helpers.
|
|
54
|
+
|
|
55
|
+
Reference documentation:
|
|
56
|
+
[PluginTools Reference Documentation](https://pandorafms.com/guides/public/books/plugintools)
|
|
57
|
+
|
|
58
|
+
## Most used functions
|
|
59
|
+
|
|
60
|
+
The README stays focused on the quick path. For a complete function list and full details, use the reference documentation link above.
|
|
61
|
+
|
|
62
|
+
| Module | Common functions |
|
|
63
|
+
|-------|------------------|
|
|
64
|
+
| `general` | `generate_md5`, `safe_input`, `safe_output`, `parse_configuration`, `parse_csv_file`, `translate_macros`, `now` |
|
|
65
|
+
| `agents` | `init_agent`, `print_agent`, `get_os` |
|
|
66
|
+
| `modules` | `init_module`, `print_module`, `init_log_module`, `print_log_module` |
|
|
67
|
+
| `transfer` | `write_xml`, `transfer_xml`, `tentacle_xml` |
|
|
68
|
+
| `threads` | `run_threads`, `run_processes`, `set_shared_dict_value`, `get_shared_dict_value` |
|
|
69
|
+
| `discovery` | `set_disco_summary`, `add_disco_summary_value`, `add_disco_info_value`, `add_disco_monitoring_data`, `disco_output` |
|
|
70
|
+
| `output` | `print_stdout`, `print_stderr`, `print_debug`, `logger` |
|
|
71
|
+
|
|
72
|
+
## Quick example
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
import pandoraPlugintools as ppt
|
|
76
|
+
|
|
77
|
+
# Define agent
|
|
78
|
+
server_name = "WIN-SERV"
|
|
79
|
+
|
|
80
|
+
agent = ppt.init_agent(
|
|
81
|
+
{
|
|
82
|
+
"agent_name": ppt.generate_md5(server_name),
|
|
83
|
+
"agent_alias": server_name,
|
|
84
|
+
"description": "Default Windows server",
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
# Define modules
|
|
89
|
+
modules = []
|
|
90
|
+
data = 10
|
|
91
|
+
|
|
92
|
+
modules.append(
|
|
93
|
+
{
|
|
94
|
+
"name": "CPU usage",
|
|
95
|
+
"type": "generic_data",
|
|
96
|
+
"value": data,
|
|
97
|
+
"desc": "Percentage of CPU utilization",
|
|
98
|
+
"unit": "%",
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Generate and transfer XML
|
|
103
|
+
xml_content = ppt.print_agent(agent, modules)
|
|
104
|
+
xml_file = ppt.write_xml(xml_content, agent["agent_name"])
|
|
105
|
+
|
|
106
|
+
ppt.transfer_xml(
|
|
107
|
+
xml_file,
|
|
108
|
+
transfer_mode="tentacle",
|
|
109
|
+
tentacle_ip="192.168.1.20",
|
|
110
|
+
tentacle_port="41121",
|
|
111
|
+
)
|
|
112
|
+
```
|
|
113
|
+
|
|
@@ -8,7 +8,7 @@ with open("README.md", mode="r", encoding="utf-8") as f:
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="pandoraPlugintools-basic",
|
|
11
|
-
version="1.0.
|
|
11
|
+
version="1.0.2",
|
|
12
12
|
author="PandoraFMS projects department",
|
|
13
13
|
author_email="<info@pandorafms.com>",
|
|
14
14
|
description="A plugin tool set of basic functions for pandorafms",
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pandoraPlugintools-basic
|
|
3
|
-
Version: 1.0.0
|
|
4
|
-
Summary: A plugin tool set of basic functions for pandorafms
|
|
5
|
-
Home-page: https://github.com/pandorafms/pandoraPlugintoolsBasic
|
|
6
|
-
Author: PandoraFMS projects department
|
|
7
|
-
Author-email: <info@pandorafms.com>
|
|
8
|
-
Description-Content-Type: text/markdown
|
|
9
|
-
License-File: LICENSE
|
|
10
|
-
Dynamic: author
|
|
11
|
-
Dynamic: author-email
|
|
12
|
-
Dynamic: description
|
|
13
|
-
Dynamic: description-content-type
|
|
14
|
-
Dynamic: home-page
|
|
15
|
-
Dynamic: license-file
|
|
16
|
-
Dynamic: summary
|
|
17
|
-
|
|
18
|
-
# pandoraPlugintoolsBasic
|
|
19
|
-
Basic version of plugintools.
|
|
20
|
-
|
|
21
|
-
# Python: module plugintools-basic for PandoraFMS Developers
|
|
22
|
-
|
|
23
|
-
pandoraPluginToolsBasic is a library that aims to help the creation of scripts and their integration in Pandora FMS. This is a simplified and lighter version. If you want to use the plugin tools with SNMP or encryption functions, it is recommended to use the standard version.
|
|
24
|
-
|
|
25
|
-
[PluginTools Reference Documentation](https://pandorafms.com/guides/public/books/plugintools)
|
|
26
|
-
|
|
27
|
-
The package includes the following modules. Each one has different functions that facilitate and automate the data integration in Pandora FMS:
|
|
28
|
-
|
|
29
|
-
**general**
|
|
30
|
-
|
|
31
|
-
Module containing general purpose functions, useful in the creation of plugins for PandoraFMS.
|
|
32
|
-
|
|
33
|
-
**threads**
|
|
34
|
-
|
|
35
|
-
Module containing threading purpose functions, useful to run parallel functions.
|
|
36
|
-
|
|
37
|
-
**agents**
|
|
38
|
-
|
|
39
|
-
Module that contains functions oriented to the creation of Pandora FMS agents
|
|
40
|
-
|
|
41
|
-
**modules**
|
|
42
|
-
|
|
43
|
-
Module that contains functions oriented to the creation of Pandora FMS modules.
|
|
44
|
-
|
|
45
|
-
**transfer**
|
|
46
|
-
|
|
47
|
-
Module containing functions oriented to file transfer and data sending to Pandora FMS server.
|
|
48
|
-
|
|
49
|
-
**discovery**
|
|
50
|
-
|
|
51
|
-
Module containing functions oriented to the creation of Pandora FMS discovery plugins.
|
|
52
|
-
|
|
53
|
-
**output**
|
|
54
|
-
|
|
55
|
-
Module containing functions oriented to output and return data.
|
|
56
|
-
|
|
57
|
-
## Example
|
|
58
|
-
|
|
59
|
-
``` python
|
|
60
|
-
import pandoraPluginTools-basic as ppt
|
|
61
|
-
|
|
62
|
-
## Define agent
|
|
63
|
-
server_name = "WIN-SERV"
|
|
64
|
-
|
|
65
|
-
agent=ppt.init_agent({
|
|
66
|
-
"agent_name" : ppt.generate_md5(server_name),
|
|
67
|
-
"agent_alias" : server_name,
|
|
68
|
-
"description" : "Default Windows server"
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
## Define modules
|
|
72
|
-
modules=[]
|
|
73
|
-
|
|
74
|
-
data = 10
|
|
75
|
-
modules.append({
|
|
76
|
-
"name" : "CPU usage",
|
|
77
|
-
"type" : "generic_data",
|
|
78
|
-
"value": data,
|
|
79
|
-
"desc" : "Percentage of CPU utilization",
|
|
80
|
-
"unit" : "%"
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
## Generate and transfer XML
|
|
84
|
-
xml_content = ppt.print_agent(agent, modules)
|
|
85
|
-
xml_file = ppt.write_xml(xml_content, agent["agent_name"])
|
|
86
|
-
ppt.transfer_xml(
|
|
87
|
-
xml_file,
|
|
88
|
-
transfer_mode="tentacle",
|
|
89
|
-
tentacle_ip="192.168.1.20",
|
|
90
|
-
tentacle_port="41121",
|
|
91
|
-
)
|
|
92
|
-
```
|
|
93
|
-
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# pandoraPlugintoolsBasic
|
|
2
|
-
Basic version of plugintools.
|
|
3
|
-
|
|
4
|
-
# Python: module plugintools-basic for PandoraFMS Developers
|
|
5
|
-
|
|
6
|
-
pandoraPluginToolsBasic is a library that aims to help the creation of scripts and their integration in Pandora FMS. This is a simplified and lighter version. If you want to use the plugin tools with SNMP or encryption functions, it is recommended to use the standard version.
|
|
7
|
-
|
|
8
|
-
[PluginTools Reference Documentation](https://pandorafms.com/guides/public/books/plugintools)
|
|
9
|
-
|
|
10
|
-
The package includes the following modules. Each one has different functions that facilitate and automate the data integration in Pandora FMS:
|
|
11
|
-
|
|
12
|
-
**general**
|
|
13
|
-
|
|
14
|
-
Module containing general purpose functions, useful in the creation of plugins for PandoraFMS.
|
|
15
|
-
|
|
16
|
-
**threads**
|
|
17
|
-
|
|
18
|
-
Module containing threading purpose functions, useful to run parallel functions.
|
|
19
|
-
|
|
20
|
-
**agents**
|
|
21
|
-
|
|
22
|
-
Module that contains functions oriented to the creation of Pandora FMS agents
|
|
23
|
-
|
|
24
|
-
**modules**
|
|
25
|
-
|
|
26
|
-
Module that contains functions oriented to the creation of Pandora FMS modules.
|
|
27
|
-
|
|
28
|
-
**transfer**
|
|
29
|
-
|
|
30
|
-
Module containing functions oriented to file transfer and data sending to Pandora FMS server.
|
|
31
|
-
|
|
32
|
-
**discovery**
|
|
33
|
-
|
|
34
|
-
Module containing functions oriented to the creation of Pandora FMS discovery plugins.
|
|
35
|
-
|
|
36
|
-
**output**
|
|
37
|
-
|
|
38
|
-
Module containing functions oriented to output and return data.
|
|
39
|
-
|
|
40
|
-
## Example
|
|
41
|
-
|
|
42
|
-
``` python
|
|
43
|
-
import pandoraPluginTools-basic as ppt
|
|
44
|
-
|
|
45
|
-
## Define agent
|
|
46
|
-
server_name = "WIN-SERV"
|
|
47
|
-
|
|
48
|
-
agent=ppt.init_agent({
|
|
49
|
-
"agent_name" : ppt.generate_md5(server_name),
|
|
50
|
-
"agent_alias" : server_name,
|
|
51
|
-
"description" : "Default Windows server"
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
## Define modules
|
|
55
|
-
modules=[]
|
|
56
|
-
|
|
57
|
-
data = 10
|
|
58
|
-
modules.append({
|
|
59
|
-
"name" : "CPU usage",
|
|
60
|
-
"type" : "generic_data",
|
|
61
|
-
"value": data,
|
|
62
|
-
"desc" : "Percentage of CPU utilization",
|
|
63
|
-
"unit" : "%"
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
## Generate and transfer XML
|
|
67
|
-
xml_content = ppt.print_agent(agent, modules)
|
|
68
|
-
xml_file = ppt.write_xml(xml_content, agent["agent_name"])
|
|
69
|
-
ppt.transfer_xml(
|
|
70
|
-
xml_file,
|
|
71
|
-
transfer_mode="tentacle",
|
|
72
|
-
tentacle_ip="192.168.1.20",
|
|
73
|
-
tentacle_port="41121",
|
|
74
|
-
)
|
|
75
|
-
```
|
|
76
|
-
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pandoraPlugintools-basic
|
|
3
|
-
Version: 1.0.0
|
|
4
|
-
Summary: A plugin tool set of basic functions for pandorafms
|
|
5
|
-
Home-page: https://github.com/pandorafms/pandoraPlugintoolsBasic
|
|
6
|
-
Author: PandoraFMS projects department
|
|
7
|
-
Author-email: <info@pandorafms.com>
|
|
8
|
-
Description-Content-Type: text/markdown
|
|
9
|
-
License-File: LICENSE
|
|
10
|
-
Dynamic: author
|
|
11
|
-
Dynamic: author-email
|
|
12
|
-
Dynamic: description
|
|
13
|
-
Dynamic: description-content-type
|
|
14
|
-
Dynamic: home-page
|
|
15
|
-
Dynamic: license-file
|
|
16
|
-
Dynamic: summary
|
|
17
|
-
|
|
18
|
-
# pandoraPlugintoolsBasic
|
|
19
|
-
Basic version of plugintools.
|
|
20
|
-
|
|
21
|
-
# Python: module plugintools-basic for PandoraFMS Developers
|
|
22
|
-
|
|
23
|
-
pandoraPluginToolsBasic is a library that aims to help the creation of scripts and their integration in Pandora FMS. This is a simplified and lighter version. If you want to use the plugin tools with SNMP or encryption functions, it is recommended to use the standard version.
|
|
24
|
-
|
|
25
|
-
[PluginTools Reference Documentation](https://pandorafms.com/guides/public/books/plugintools)
|
|
26
|
-
|
|
27
|
-
The package includes the following modules. Each one has different functions that facilitate and automate the data integration in Pandora FMS:
|
|
28
|
-
|
|
29
|
-
**general**
|
|
30
|
-
|
|
31
|
-
Module containing general purpose functions, useful in the creation of plugins for PandoraFMS.
|
|
32
|
-
|
|
33
|
-
**threads**
|
|
34
|
-
|
|
35
|
-
Module containing threading purpose functions, useful to run parallel functions.
|
|
36
|
-
|
|
37
|
-
**agents**
|
|
38
|
-
|
|
39
|
-
Module that contains functions oriented to the creation of Pandora FMS agents
|
|
40
|
-
|
|
41
|
-
**modules**
|
|
42
|
-
|
|
43
|
-
Module that contains functions oriented to the creation of Pandora FMS modules.
|
|
44
|
-
|
|
45
|
-
**transfer**
|
|
46
|
-
|
|
47
|
-
Module containing functions oriented to file transfer and data sending to Pandora FMS server.
|
|
48
|
-
|
|
49
|
-
**discovery**
|
|
50
|
-
|
|
51
|
-
Module containing functions oriented to the creation of Pandora FMS discovery plugins.
|
|
52
|
-
|
|
53
|
-
**output**
|
|
54
|
-
|
|
55
|
-
Module containing functions oriented to output and return data.
|
|
56
|
-
|
|
57
|
-
## Example
|
|
58
|
-
|
|
59
|
-
``` python
|
|
60
|
-
import pandoraPluginTools-basic as ppt
|
|
61
|
-
|
|
62
|
-
## Define agent
|
|
63
|
-
server_name = "WIN-SERV"
|
|
64
|
-
|
|
65
|
-
agent=ppt.init_agent({
|
|
66
|
-
"agent_name" : ppt.generate_md5(server_name),
|
|
67
|
-
"agent_alias" : server_name,
|
|
68
|
-
"description" : "Default Windows server"
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
## Define modules
|
|
72
|
-
modules=[]
|
|
73
|
-
|
|
74
|
-
data = 10
|
|
75
|
-
modules.append({
|
|
76
|
-
"name" : "CPU usage",
|
|
77
|
-
"type" : "generic_data",
|
|
78
|
-
"value": data,
|
|
79
|
-
"desc" : "Percentage of CPU utilization",
|
|
80
|
-
"unit" : "%"
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
## Generate and transfer XML
|
|
84
|
-
xml_content = ppt.print_agent(agent, modules)
|
|
85
|
-
xml_file = ppt.write_xml(xml_content, agent["agent_name"])
|
|
86
|
-
ppt.transfer_xml(
|
|
87
|
-
xml_file,
|
|
88
|
-
transfer_mode="tentacle",
|
|
89
|
-
tentacle_ip="192.168.1.20",
|
|
90
|
-
tentacle_port="41121",
|
|
91
|
-
)
|
|
92
|
-
```
|
|
93
|
-
|
|
File without changes
|
{pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/__init__.py
RENAMED
|
File without changes
|
{pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/discovery.py
RENAMED
|
File without changes
|
{pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/general.py
RENAMED
|
File without changes
|
{pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/output.py
RENAMED
|
File without changes
|
{pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/threads.py
RENAMED
|
File without changes
|
{pandoraplugintools_basic-1.0.0 → pandoraplugintools_basic-1.0.2}/pandoraPlugintools/transfer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|