I am absolutely confused with these custom plugins and was wondering if anyone can answer
1. When I run the script and validate manually everything is fine no problem - I then add the script to become a plugin and Site 24x7 dashboard tells me that the JSON output is invalid. I then rename the folder & script and suddenly its correct?
2. How can I manually trigger a poll for the plugin. At times I can add a new plugin or change (changing the version number) and site 24x7 doesn't even see anything has changed in the plugin folder. How can I trigger the app to check or how can I see why the agent has not even attempted to find the plugin?
3. How can I ensure that the plugin is actually working with the agent?
I just wanted to add - restarting the service doesnt fix I have to uninstall and reinstall the agent
Hi Jordan,
We apologize for the inconvenience. We have clarified some of the issues you had pointed out in your post. Please find them as follows:
1. When I run the script and validate manually everything is fine no problem - I then add the script to become a plugin and Site 24x7 dashboard tells me that the JSON output is invalid. I then rename the folder & script and suddenly its correct?
A single-level JSON is the output that the plugin requires along with heartbeat_required and plugin_version attributes. Default polling frequency for a plugin is 5 minutes. But, it will try executing the script again in case any new plugin is added every minute. In case the plugin folder or the plugin file has been added to the agent directory after that, it might not execute it properly and show an invalid error. Please try moving both the folder and file together to the plugins directory after testing it in a local environment. If it is a custom plugin, add the errors to the msg attribute to get the proper error response while registering the plugin.
2. How can I manually trigger a poll for the plugin. At times I can add a new plugin or change (changing the version number) and site 24x7 doesn't even see anything has changed in the plugin folder. How can I trigger the app to check or how can I see why the agent has not even attempted to find the plugin?
Manual poll triggering is not supported for plugins. Adding a file or folder will trigger the agent to execute the plugin at the end of the minute and poll according to the poll frequency set for the plugin monitor. Change in the version number is to indicate that there is a change in the list of attributes to be monitored in the plugin and it will initiate a template creation/updation process with the current attributes sent to Site24x7. If you are not altering the attributes, changing the plugin version will not make any difference. If that specific version is already registered, the agent will not let you add that plugin again with a lower version number.
To make the agent take up the polling for plugins, remove the file pl_id_mapper in the conf folder and restart the agent. It will automatically register the plugin again.
3. How can I ensure that the plugin is actually working with the agent?
Please check the last polled time of the plugin. There is a last polled attribute widget in the details page. If there is no value for an attribute, value for it is not polled. And if the attribute itself is not present, the attribute was not registered in the first place.
4. I just wanted to add - restarting the service doesn't fix I have to uninstall and reinstall the agent .
Restarting the agent will only clear the existing inventory and resend the current plugin folder(s) and its status available.
Removing pl_id_mapper and restarting will clear the existing inventory and re-register all the plugins available. You can also remove the file ignored_plugins.txt under temp and restart the agent to re-register the plugins.
Let us know if this helps. For any other queries, please comment in the below thread.
Thanks!