This repository was archived by the owner on Nov 3, 2025. It is now read-only.
  
  
  - 
                Notifications
    
You must be signed in to change notification settings  - Fork 69
 
Additional processing of data in Plugins
        Brett Demetris edited this page Jun 20, 2018 
        ·
        4 revisions
      
    In addition to running plugin scripts on the client, you can perform additional processing on the server.
To do so, you should implement the checkin_processor method of your plugin's class. You will need to handle the writing of the data back to the database yourself.
For example, in your plugin.py:
# ...Other imports here
import sal.plugin
from server.models import *
class MyPlugin(sal.plugin.Widget):
    # ...
def checkin_processor(self, machine, report_data):
    # ...Do something with the report_data
    item_we_want = report_data['Facter']['somefact']
    # Some munging could happen here - maybe sending it to another service
    plugin_name = 'WhizzyPlugin'
    plugin_script = PluginScriptSubmission(machine=machine, plugin=plugin_name, historical=False)
    plugin_script.save()
    data = plugin.get('data')
    plugin_row = PluginScriptRow(submission=plugin_script, pluginscript_name='WhizzyData', pluginscript_data=item_we_want, submission_and_script_name=(plugin_name + ': ' + 'WhizzyData'))
    plugin_row.save()For what it's worth, none of the builtin plugins need to use this mechanism.
See plugin.py for all current methods
| name | args | description | 
|---|---|---|
| checkin_processor | machine (string), report_data (dict) | handles data passed through the /checkin route | 
| profiles_processor | machine (string), profiles_list (dict) | handles data passed through the /profiles route | 
- Brute force protection
 - LDAP integration
 - Active Directory integration
 - API
 - Usage reporting
 - License Management
 - Maintenance
 - Search
 - Troubleshooting
 - SAML
 - IAM Authentication for AWS RDS Postgres
 
- Docker
 - Ubuntu 14.04
 - Ubuntu 16.04
 - RHEL 7
 - Kubernetes
 - Heroku?