Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fortiswitch template port names as $1 #300

Open
ftoledo opened this issue Oct 31, 2023 · 9 comments
Open

fortiswitch template port names as $1 #300

ftoledo opened this issue Oct 31, 2023 · 9 comments

Comments

@ftoledo
Copy link

ftoledo commented Oct 31, 2023

I triying to use the fortiswitch_124e-poe.yaml template on F148F POE

imagen
the port names sems to wont detected as show as $1

any way to fix ?
thanks!

@fxbeaulieu
Copy link

I have this issue since migrating to ZBX 6.0 in various templates too. If anyone has a solution or even an explanation as to why this happens, I would love to hear it.

@tbblake
Copy link
Contributor

tbblake commented Oct 31, 2023

Positional macros were deprecated in 4.0 and fully removed in 6.0.

https://www.zabbix.com/documentation/6.0/en/manual/introduction/whatsnew600#positional-macros-no-longer-supported

@ftoledo
Copy link
Author

ftoledo commented Oct 31, 2023

I have this issue since migrating to ZBX 6.0 in various templates too. If anyone has a solution or even an explanation as to why this happens, I would love to hear it.

I found that other templates change the variables $1 $2 $nnnn by names
example:
https://github.com/zabbix/community-templates/pull/286/files

@tbblake
Copy link
Contributor

tbblake commented Oct 31, 2023

That template used too, that pull request changes the template from using positional macros to using discovery macros.

@ftoledo
Copy link
Author

ftoledo commented Oct 31, 2023

I still don't have knowledge of template development. (I just now start to reading docs)

for this case:
imagen

Should I change the $1 to {#SNMPVALUE} ?

@tbblake
Copy link
Contributor

tbblake commented Oct 31, 2023

I believe so. Personally, I would import the templates and look at the item prototype. You'd likely see an item prototype with a name of Link Speed $1 and a key of [ifHighSpeed[{#SNMPVALUE}]. I'd change the $1 to {#SNMPVALUE} like you say, re-run discovery or wait for it to run, and see if it updates for the Link Speed items. If it does, then make similar changes on the other item prototypes. If they all work, I'd then export the template and do a pull request.

@tbblake
Copy link
Contributor

tbblake commented Oct 31, 2023

Yup looks like just these three item prototypes would need that change.

image

@ftoledo
Copy link
Author

ftoledo commented Oct 31, 2023

Yes! i can conrfim that change $1 to {#SNMPVALUE} just works.

imagen

@fxbeaulieu
Copy link

Thanks a lot, will try to correct our templates in the same way tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants