Closed send2ali closed 2 months ago
how big is the U7 pro max output? more than 64k? Zabbix does have a limit there mca-dump works around it before handing the value to zabbix, but the u7 pro max must be adding new info. If you are willing to send me one of the mac-dump outputs I will take a look,,
The dumps look around 73k to 77k, the file size changes each time I ran it. Lowest I saw it was around 44k. The U7-Pro seems to be around 10k.
Sure, I can send you the dumps directly. Let me know how you want it sent.
Email at @.*** is good..
-P
On Sep 27, 2024, at 2:58 PM, send2ali @.***> wrote:
The dumps look around 73k to 77k, the file size changes each time I ran it. Lowest I saw it was around 44k. The U7-Pro seems to be around 10k.
Sure, I can send you the dumps directly. Let me know how you want it sent.
— Reply to this email directly, view it on GitHub https://github.com/patricegautier/unifiZabbix/issues/124#issuecomment-2380154113, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJ5Q2WEQAQA5GGLXDTLZYXIHLAVCNFSM6AAAAABO6NMEFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQGE2TIMJRGM. You are receiving this because you commented.
looks like your email address got block. Try another way.
Blocked how? That’s a new one..
-P
On Sep 27, 2024, at 3:30 PM, send2ali @.***> wrote:
looks like your email address got block. Try another way.
— Reply to this email directly, view it on GitHub https://github.com/patricegautier/unifiZabbix/issues/124#issuecomment-2380232619, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJ6MCPFIVD6JZWEPEULZYXMA3AVCNFSM6AAAAABO6NMEFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQGIZTENRRHE. You are receiving this because you commented.
I see the address like this
Email at @.*** is good..
Sneaky GitHub!..
The email is Patrice at Mac .com
-P
On Sep 27, 2024, at 3:47 PM, send2ali @.***> wrote:
I see the address like this
Email at @.*** is good..
— Reply to this email directly, view it on GitHub https://github.com/patricegautier/unifiZabbix/issues/124#issuecomment-2380245289, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJ4GP5WTV6GJNTANMP3ZYXN77AVCNFSM6AAAAABO6NMEFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQGI2DKMRYHE. You are receiving this because you commented.
ok, just sent it.
Ok you might try this latest commit for mca-dump and let me know if that solves it.. I can’t test here unfortunately.
-P
On Sep 27, 2024, at 4:05 PM, send2ali @.***> wrote:
ok, just sent it.
— Reply to this email directly, view it on GitHub https://github.com/patricegautier/unifiZabbix/issues/124#issuecomment-2380257234, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJ5S7H7J56RASHHDQU3ZYXQDJAVCNFSM6AAAAABO6NMEFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQGI2TOMRTGQ. You are receiving this because you commented.
I still got errors. (see below) but I get a permissions error when I try running the dump manually now. I need to recheck my work again when I back later.
this is the perm error:
$ sudo -u root /usr/lib/zabbix/externalscripts/mca-dump-short.sh -d 10.10.0.27 -u admin -i zb_id_rsa -t AP /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 73: /tmp/mcaDumpShort.err: Permission denied /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 73: /tmp/mcaDumpShort.err: Permission denied { "at":"10:18:41", "r":"timeout (124)", "device":"10.10.0.27", "mcaDumpTimeout":"Error" }
:/usr/lib/zabbix/externalscripts$ ls -lsa total 52 4 drwxr-xr-x 2 zabbix zabbix 4096 Sep 28 10:02 . 4 drwxr-xr-x 5 root root 4096 Sep 22 2021 .. 20 -rwxr-xr-x 1 root root 19629 Sep 28 09:59 mca-dump-short.sh 20 -rwxr-xr-x 1 root root 18752 Sep 28 09:57 mca-dump-short.sh.bk 4 -rwxrwxrwx 1 zabbix zabbix 1678 Mar 30 13:57 ssh-run.sh
So it’s complaining about permissions on /tmp/mcaDumpShort.err
What does ls -l /tmp/mcaDumpShort.err look like?
-P{
On Sep 27, 2024, at 5:20 PM, send2ali @.***> wrote:
this is the perm error:
$ sudo -u root /usr/lib/zabbix/externalscripts/mca-dump-short.sh -d 10.10.0.27 -u admin -i zb_id_rsa -t AP /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 73: /tmp/mcaDumpShort.err: Permission denied /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 73: /tmp/mcaDumpShort.err: Permission denied { "at":"10:18:41", "r":"timeout (124)", "device":"10.10.0.27", "mcaDumpTimeout":"Error" }
:/usr/lib/zabbix/externalscripts$ ls -lsa total 52 4 drwxr-xr-x 2 zabbix zabbix 4096 Sep 28 10:02 . 4 drwxr-xr-x 5 root root 4096 Sep 22 2021 .. 20 -rwxr-xr-x 1 root root 19629 Sep 28 09:59 mca-dump-short.sh 20 -rwxr-xr-x 1 root root 18752 Sep 28 09:57 mca-dump-short.sh.bk 4 -rwxrwxrwx 1 zabbix zabbix 1678 Mar 30 13:57 ssh-run.sh
— Reply to this email directly, view it on GitHub https://github.com/patricegautier/unifiZabbix/issues/124#issuecomment-2380311187, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJ7XDZ5ZWZBHJV2L2T3ZYXY4RAVCNFSM6AAAAABO6NMEFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQGMYTCMJYG4. You are receiving this because you commented.
Hey I think your updated mca dump might be broken. When I try to use it, it break for all my unifi devices.
I see theses in the server logs:
1256860:20240928:220846.943 error reason for "10.10.0.12:uptime" changed: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe.{ "at...
This is what my scrip folder and error log look like.
:/usr/lib/zabbix/externalscripts$ ls -lsa total 52 4 drwxr-xr-x 2 zabbix zabbix 4096 Sep 28 22:10 . 4 drwxr-xr-x 5 root root 4096 Sep 22 2021 .. 20 -rwxr-xr-x 1 zabbix zabbix 18752 Sep 28 09:57 mca-dump-short.sh 20 -rwxrwxrwx 1 zabbix zabbix 19685 Sep 28 21:54 mca-dump-short.sh.broken 4 -rwxrwxrwx 1 zabbix zabbix 1678 Mar 30 13:57 ssh-run.sh
:/usr/lib/zabbix/externalscripts$ ls -l /tmp/mcaDumpShort.err -rw-rw-r-- 1 zabbix zabbix 6679855 Sep 28 22:09 /tmp/mcaDumpShort.err
When i rollback to the old script it all started working again.
This could be a issue with me as I've been playing around with this a bit, just to let you know I've done the following to get your updated script.
sudo curl -o mca-dump-short.sh https://raw.githubusercontent.com/patricegautier/unifiZabbix/master/mca-dump-short.sh sudo chmod a+x /usr/lib/zabbix/externalscripts /usr/lib/zabbix/externalscripts/mca-dump-short.sh sudo chown zabbix:zabbix /usr/lib/zabbix/externalscripts /usr/lib/zabbix/externalscripts/mca-dump-short.sh sudo chmod 777 mca-dump-short.sh (didn't need to to this... )
Good news, I see the same problem here. Stay tuned.
On Sep 28, 2024, at 5:23 AM, send2ali @.***> wrote:
Hey I think your updated mca dump might be broken. When I try to use it, it break for all my unification devices.
I see theses in the server logs:
1256860:20240928:220846.943 error reason for "10.10.0.12:uptime" changed: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe.{ "at...
Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe.{ "at... Failed: cannot extract value from json by path "$.uptime": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe { "at":"22:08:46", "r":"jq --indent 0 del (.port_table) |\ del(.radiotable[]?.scan 1256860:20240928:220846.943 error reason for "10.10.0.12:wireless_reception_bandwidth" changed: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe.{ "at... Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe.{ "at... Failed: cannot extract value from json by path "$.vap_table.[*].rx_bytes.sum()": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe { "at":"22:08:46", "r":"jq --indent 0 del (.port_table) |\ This is what my scrip folder and error log look like.
:/usr/lib/zabbix/externalscripts$ ls -lsa total 52 4 drwxr-xr-x 2 zabbix zabbix 4096 Sep 28 22:10 . 4 drwxr-xr-x 5 root root 4096 Sep 22 2021 .. 20 -rwxr-xr-x 1 zabbix zabbix 18752 Sep 28 09:57 mca-dump-short.sh 20 -rwxrwxrwx 1 zabbix zabbix 19685 Sep 28 21:54 mca-dump-short.sh.broken 4 -rwxrwxrwx 1 zabbix zabbix 1678 Mar 30 13:57 ssh-run.sh
:/usr/lib/zabbix/externalscripts$ ls -l /tmp/mcaDumpShort.err -rw-rw-r-- 1 zabbix zabbix 6679855 Sep 28 22:09 /tmp/mcaDumpShort.err
When i rollback to the old script it all started working again.
This could be a issue with me as I've been playing around with this a bit, just to let you know I've done the following to get your updated script.
sudo curl -o mca-dump-short.sh https://raw.githubusercontent.com/patricegautier/unifiZabbix/master/mca-dump-short.sh sudo chmod a+x /usr/lib/zabbix/externalscripts /usr/lib/zabbix/externalscripts/mca-dump-short.sh sudo chown zabbix:zabbix /usr/lib/zabbix/externalscripts /usr/lib/zabbix/externalscripts/mca-dump-short.sh sudo chmod 777 mca-dump-short.sh (didn't need to to this... )
— Reply to this email directly, view it on GitHub https://github.com/patricegautier/unifiZabbix/issues/124#issuecomment-2380623378, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJ2JD5BGOUQ7TXM6NMDZY2NTRAVCNFSM6AAAAABO6NMEFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQGYZDGMZXHA. You are receiving this because you commented.
Try this latest..
On Sep 28, 2024, at 11:23 AM, Patrice Gautier @.***> wrote:
Good news, I see the same problem here. Stay tuned.
On Sep 28, 2024, at 5:23 AM, send2ali @.***> wrote:
Hey I think your updated mca dump might be broken. When I try to use it, it break for all my unification devices.
I see theses in the server logs:
1256860:20240928:220846.943 error reason for "10.10.0.12:uptime" changed: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe.{ "at...
Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe.{ "at... Failed: cannot extract value from json by path "$.uptime": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe { "at":"22:08:46", "r":"jq --indent 0 del (.port_table) |\ del(.radiotable[]?.scan 1256860:20240928:220846.943 error reason for "10.10.0.12:wireless_reception_bandwidth" changed: Preprocessing failed for: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe.{ "at... Result: /usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe.{ "at... Failed: cannot extract value from json by path "$.vap_table.[*].rx_bytes.sum()": invalid object format, expected opening character '{' or '[' at: '/usr/lib/zabbix/externalscripts/mca-dump-short.sh: line 439: echo: write error: Broken pipe { "at":"22:08:46", "r":"jq --indent 0 del (.port_table) |\ This is what my scrip folder and error log look like.
:/usr/lib/zabbix/externalscripts$ ls -lsa total 52 4 drwxr-xr-x 2 zabbix zabbix 4096 Sep 28 22:10 . 4 drwxr-xr-x 5 root root 4096 Sep 22 2021 .. 20 -rwxr-xr-x 1 zabbix zabbix 18752 Sep 28 09:57 mca-dump-short.sh 20 -rwxrwxrwx 1 zabbix zabbix 19685 Sep 28 21:54 mca-dump-short.sh.broken 4 -rwxrwxrwx 1 zabbix zabbix 1678 Mar 30 13:57 ssh-run.sh
:/usr/lib/zabbix/externalscripts$ ls -l /tmp/mcaDumpShort.err -rw-rw-r-- 1 zabbix zabbix 6679855 Sep 28 22:09 /tmp/mcaDumpShort.err
When i rollback to the old script it all started working again.
This could be a issue with me as I've been playing around with this a bit, just to let you know I've done the following to get your updated script.
sudo curl -o mca-dump-short.sh https://raw.githubusercontent.com/patricegautier/unifiZabbix/master/mca-dump-short.sh sudo chmod a+x /usr/lib/zabbix/externalscripts /usr/lib/zabbix/externalscripts/mca-dump-short.sh sudo chown zabbix:zabbix /usr/lib/zabbix/externalscripts /usr/lib/zabbix/externalscripts/mca-dump-short.sh sudo chmod 777 mca-dump-short.sh (didn't need to to this... )
— Reply to this email directly, view it on GitHub https://github.com/patricegautier/unifiZabbix/issues/124#issuecomment-2380623378, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFHTJ2JD5BGOUQ7TXM6NMDZY2NTRAVCNFSM6AAAAABO6NMEFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQGYZDGMZXHA. You are receiving this because you commented.
The updated script looks to have resolved the issues, all working now. Had it running for an hour or so. Thanks for your help with all this :-)
Updated script is now working with the new U7 Pro Max AP's
Hi, I just installed two U7 Pro Max's and having issues with your scrip.
The Zabbix logs showing the following:
256862:20240927:151256.748 error reason for "10.10.0.27:cpu" changed: Preprocessing failed for: parse error: Invalid numeric literal at line 1, column 7./usr/lib/zabbix/externalscripts/mca-dump...
Every item is giving the same error.
Im able to run the script on the Zabbix server and is pulling data successfully. It much more data compared to a U7 Pro. I'm not having issues with any other AP'or switches.
Any help would be great