Open danielgbeer opened 1 year ago
We're working on an updated template to cover both the new FMS features AND the new Zabbix versions. Our current thinking is to do away with OS-specific scripting and use JS where we can so that the code is the same for all OSes and we can rely on NodeJS always to be there on an FMS.
In the meantime, if you can send me your full py file I can see if I can debug it to unblock you.
HI Wim, thanks for your quick reply. Attached it the Py file - it’s basically the same as the GitHub version, but with the added path to load the v3 requests module. I spent a lot of time looking into this yesterday, and I think the issue now may not be the py file, but that the template is trying to use admin API v1 because the template doesn’t recognize the OS… but I don’t know how to verify that. File attached.
Daniel
-- Daniel Beer +1 347 335 1156 On Dec 12, 2022 at 7:44 AM -0500, Wim Decorte @.***>, wrote:
We're working on an updated template to cover both the new FMS features AND the new Zabbix versions. Our current thinking is to do away with OS-specific scripting and use JS where we can so that the code is the same for all OSes and we can rely on NodeJS always to be there on an FMS.
In the meantime, if you can send me your full py file I can see if I can debug it to unblock you.
— Reply to this email directly, view it on GitHubhttps://github.com/soliantconsulting/FileMaker-Server-Zabbix-Templates/issues/12#issuecomment-1346435172, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACC42Y337Y6KD2YAY5FMSETWM4M33ANCNFSM6AAAAAAS3DLKEQ. You are receiving this because you authored the thread.Message ID: @.***>
Looking through the Latest Data, there’s an odd collection of items that working/not working. E.g. "FMS config CacheSize” (tags: Application: Config Application: fmsadmin Application: macOS Application: Windows ) is working, but "FMS config Cache Size” (tags: Application: Admin API v2 Application: Config Application: FMC 1.x Application: macOS Application: Windows )is not. I assume these are reading the same thing, but one is working and one is not - perhaps that might give you an indication of where a breakdown is occurring.
Daniel
-- Daniel Beer +1 347 335 1156 On Dec 12, 2022 at 7:44 AM -0500, Wim Decorte @.***>, wrote:
We're working on an updated template to cover both the new FMS features AND the new Zabbix versions. Our current thinking is to do away with OS-specific scripting and use JS where we can so that the code is the same for all OSes and we can rely on NodeJS always to be there on an FMS.
In the meantime, if you can send me your full py file I can see if I can debug it to unblock you.
— Reply to this email directly, view it on GitHubhttps://github.com/soliantconsulting/FileMaker-Server-Zabbix-Templates/issues/12#issuecomment-1346435172, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACC42Y337Y6KD2YAY5FMSETWM4M33ANCNFSM6AAAAAAS3DLKEQ. You are receiving this because you authored the thread.Message ID: @.***>
In response to my original issue, the first line was referencing python (which does not exist on our servers) so I changed to python3 which helped. I'm not sure if my original fix (of changing the import order) also made a difference but at least I'm getting some data now.
Was: #!/usr/bin/python
Now:#!/usr/bin/python3
I'm not sure if it's my lack of python knowledge or the code, so bear with me...
I've spent ages working through issues trying to get this template and .py file working with Zabbix 6.2 monitoring Ubuntu 20 and FMS 19.5 and 19.6.
I keep getting errors in Zabbix to do with the I read that Ubuntu 20 dropped support for the requests module in zabbix 2.7 I tried using the python3 requests module by changing:
import requests
from requests.auth import HTTPBasicAuth
import sys
to
import sys
sys.path.append('/usr/lib/python3/dist-packages')
import requests
from requests.auth import HTTPBasicAuth
However zabbix is still returning an error: `Preprocessing failed for: Traceback (most recent call last):. File "/etc/zabbix/scripts/fms_config.py", line 99, in <modul...
Line 99 is:
config = requests.get(config_url, headers=headers, verify=False)
Someone who know what they're doing will probably see the issue straight away... that person is not me. Any help would be greatly appreciated!