Hello my few little readers,
Due to my recent focus on monitoring. I have decided to continue the updates on using zabbix.
For the next few posts you will find my own little zabbix scripts, custom checks and agentless checks.
I will do my best to explain what does what and if I have a working template to go along with it I will upload it in the post.
So keep your eyes peeled for updates.
PS: feel free to ask for things you wish to have monitored. I am sure I can work something up :)
I try to set up a flexible user parameter (one that accepts parameters) with a command that uses a positional parameter like $1, but it doesn't work (uses item parameter instead). How to solve this?
ReplyDeleteIn what condition are you using the parameter? What is the particular item your attempting to retrieve?
ReplyDeleteZabbix generally replaced positional parameters once the data is pulled into the template. for example:
monitoring /dev/$1 would be substituted by the parameter within your template if used in the name space "Disk:$1" and key space [sdk]. This will result in the following output:
/dev/sdk & "Disk:sdk"
Hope that answers your question
On the other hand if your simply looking for $1 you may have to look into ways to simply escape it.
ReplyDeleteThis can be done by simply using "$$1"
thanks bro
ReplyDeleteDoes Zabbix need every host you want to monitor to have some sort of agent installed?
ReplyDeleteSorry if i am aksing stupid questions
i'm new at this.
No. Zabbix has other mechanisms for agentless checks. For one you can monitor via SNMP, external script checks etc.
ReplyDeleteIts all a case of what you wish to do. Hell if your toaster had an IP you could monitor it.