# Python: module plugintools for PandoraFMS Developers
pandoraPluginTools is a library that aims to help the creation of scripts and their integration in Pandora FMS.
[PluginTools Reference Documentation](https://pandorafms.com/guides/public/books/plugintools)
The package includes the following modules. Each one has different functions that facilitate and automate the data integration in Pandora FMS:
**general**
Module containing general purpose functions, useful in the creation of plugins for PandoraFMS.
**threads**
Module containing threading purpose functions, useful to run parallel functions.
**agents**
Module that contains functions oriented to the creation of Pandora FMS agents
**modules**
Module that contains functions oriented to the creation of Pandora FMS modules.
**transfer**
Module containing functions oriented to file transfer and data sending to Pandora FMS server.
**discovery**
Module containing functions oriented to the creation of Pandora FMS discovery plugins.
**http**
Module containing functions oriented to HTTP API calls.
**snmp**
Module containing functions oriented to calls to snmp operations.
**encryption**
Module containing encryption oriented functions.
**output**
Module containing functions oriented to output and return data.
## Example
``` python
import pandoraPluginTools as ppt
## Define agent
server_name = "WIN-SERV"
agent=ppt.init_agent({
"agent_name" : ppt.generate_md5(server_name),
"agent_alias" : server_name,
"description" : "Default Windows server"
})
## Define modules
modules=[]
data = 10
modules.append({
"name" : "CPU usage",
"type" : "generic_data",
"value": data,
"desc" : "Percentage of CPU utilization",
"unit" : "%"
})
## Generate and transfer XML
xml_content = ppt.print_agent(agent, modules)
xml_file = ppt.write_xml(xml_content, agent["agent_name"])
ppt.transfer_xml(
xml_file,
transfer_mode="tentacle",
tentacle_ip="192.168.1.20",
tentacle_port="41121",
)
```
The package has the following dependencies:
- Hashlib
- datetime.datetime
- hashlib
- json
- os
- print_agent
- print_log_module
- print_module
- queue.Queue
- requests.auth.HTTPBasicAuth
- requests.auth.HTTPDigestAuth
- requests.sessions.Session
- requests_ntlm.HttpNtlmAuth
- shutil
- subprocess.Popen
- sys
- threading.Thread
- pycrypto
- easysnmp
- pysnmp
Raw data
{
"_id": null,
"home_page": "https://github.com/projects-pandorafms/pandoraPlugintools",
"name": "pandoraPlugintools",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, pandora, pandorafms, plugintool, plugintools, pandoraPlugintools",
"author": "PandoraFMS projects department",
"author_email": "<projects@pandorafms.com>",
"download_url": "https://files.pythonhosted.org/packages/49/ae/212d976ac434cf4b9e7654b3a4ba604a539a191f1abe0de2a60566e48740/pandoraPlugintools-1.0.10.tar.gz",
"platform": null,
"description": "# Python: module plugintools for PandoraFMS Developers\n\npandoraPluginTools is a library that aims to help the creation of scripts and their integration in Pandora FMS.\n\n[PluginTools Reference Documentation](https://pandorafms.com/guides/public/books/plugintools)\n\nThe package includes the following modules. Each one has different functions that facilitate and automate the data integration in Pandora FMS: \n\n**general**\n\nModule containing general purpose functions, useful in the creation of plugins for PandoraFMS.\n\n**threads**\n\nModule containing threading purpose functions, useful to run parallel functions.\n\n**agents**\n\nModule that contains functions oriented to the creation of Pandora FMS agents\n\n**modules**\n\nModule that contains functions oriented to the creation of Pandora FMS modules.\n\n**transfer**\n\nModule containing functions oriented to file transfer and data sending to Pandora FMS server.\n\n**discovery**\n\nModule containing functions oriented to the creation of Pandora FMS discovery plugins.\n\n**http**\n\nModule containing functions oriented to HTTP API calls.\n\n**snmp**\n\nModule containing functions oriented to calls to snmp operations.\n\n**encryption**\n\nModule containing encryption oriented functions.\n\n**output**\n\nModule containing functions oriented to output and return data.\n\n## Example \n\n``` python\nimport pandoraPluginTools as ppt\n\n## Define agent\nserver_name = \"WIN-SERV\"\n\nagent=ppt.init_agent({\n \"agent_name\" : ppt.generate_md5(server_name),\n \"agent_alias\" : server_name,\n \"description\" : \"Default Windows server\"\n})\n\n## Define modules\nmodules=[]\n\ndata = 10\nmodules.append({\n \"name\" : \"CPU usage\",\n \"type\" : \"generic_data\",\n \"value\": data,\n \"desc\" : \"Percentage of CPU utilization\",\n \"unit\" : \"%\"\n})\n\n## Generate and transfer XML\nxml_content = ppt.print_agent(agent, modules)\nxml_file = ppt.write_xml(xml_content, agent[\"agent_name\"])\nppt.transfer_xml(\n xml_file,\n transfer_mode=\"tentacle\",\n tentacle_ip=\"192.168.1.20\",\n tentacle_port=\"41121\",\n)\n```\n\nThe package has the following dependencies:\n- Hashlib\n- datetime.datetime\n- hashlib\n- json\n- os\n- print_agent\n- print_log_module\n- print_module\n- queue.Queue\n- requests.auth.HTTPBasicAuth\n- requests.auth.HTTPDigestAuth\n- requests.sessions.Session\n- requests_ntlm.HttpNtlmAuth\n- shutil\n- subprocess.Popen\n- sys\n- threading.Thread\n- pycrypto\n- easysnmp\n- pysnmp\n",
"bugtrack_url": null,
"license": null,
"summary": "A plugin tool set of functions for pandorafms",
"version": "1.0.10",
"project_urls": {
"Homepage": "https://github.com/projects-pandorafms/pandoraPlugintools"
},
"split_keywords": [
"python",
" pandora",
" pandorafms",
" plugintool",
" plugintools",
" pandoraplugintools"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "49ae212d976ac434cf4b9e7654b3a4ba604a539a191f1abe0de2a60566e48740",
"md5": "5603774f07e49a05db082612e1d4bf41",
"sha256": "5ffc276e2c275d1e111aac31fba09492f301df2e04d564c64c7ee147e8e914b9"
},
"downloads": -1,
"filename": "pandoraPlugintools-1.0.10.tar.gz",
"has_sig": false,
"md5_digest": "5603774f07e49a05db082612e1d4bf41",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 24436,
"upload_time": "2024-04-18T09:53:48",
"upload_time_iso_8601": "2024-04-18T09:53:48.993034Z",
"url": "https://files.pythonhosted.org/packages/49/ae/212d976ac434cf4b9e7654b3a4ba604a539a191f1abe0de2a60566e48740/pandoraPlugintools-1.0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-18 09:53:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "projects-pandorafms",
"github_project": "pandoraPlugintools",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pandoraplugintools"
}