Skip to main content

A plugin tool set of functions for pandorafms

Project description

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

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pandoraplugintools-1.0.16.tar.gz (24.8 kB view details)

Uploaded Source

File details

Details for the file pandoraplugintools-1.0.16.tar.gz.

File metadata

  • Download URL: pandoraplugintools-1.0.16.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pandoraplugintools-1.0.16.tar.gz
Algorithm Hash digest
SHA256 40aac2a6b86d4e777db9c9f8280437e3b1c7935514878850aabd14cb5878f71d
MD5 db9ffcd1f6f666004e64b4dc7ac08b0f
BLAKE2b-256 fdad61b5b168662a615e1183ae8bf91aaefd82e378cc1b1e70b89eeaf339117a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page