ZenPacks, JSON API, and Integrations

 View Only
  • 1.  dsplugins - params method is passing Null Values to below method

    Posted 03-28-2022 11:21 PM
    Hello Team, 
    Good day, 
    I am working on collecting memory metrics for Juniper Routing Engine. On Modelling I can see the memory metrics for the Routing Engine. Later I started adding monitoring section. I have added required details to perform monitoring. I am using pythondatasource plugin and created a dsplugin to update datasource/datapoint.  After the code changes, I have restarted all the zenoss services under zenoss resmgr (includes zenhub). 

    Later after modelling, I have attached to zenpython service and started running zenpython. I am observing exceptions keyerror  in success method.
    While debugging I found that the params method in dsplugin is passing null arguments to collect method. Any idea how to resolve this issue. 

    I had the same issue for CPU as well, but later after multiple restart(not sure how it got fixed) I can see config.datasource passed to collect method. 

    I have log.info in success method to show datasource.params . I can see it is returning null, due to which I get keyerror. 
    please see below logs. Thank you 

    Melbourne VIC

  • 2.  RE: dsplugins - params method is passing Null Values to below method

    Posted 03-30-2022 01:44 AM
    The params wethod of a datasource logs to zenhub.log, not zenpython.log.  I suggest you put some log statements (info or higher) into your params method and see what is going on.   It looks like, in params you are probably trying to use an element of a list or dictionary with the key of 'hostname' - and that key doesn't exist.  If it was me, I probably called the key 'host' when I set it up and then forgot and used 'hostname' later in the code ;)


    Jane Curry
    Skills 1st United Kingdom