Guys,
I needed to collect the value used for each partition within a deploy that does not accept agent or snmp connections. So, I thought of collecting via ssh, using a DF with some commands. At first it worked, and when I run the command below, it returns the value%, for example 50%
df -h | grep VD01 | awk {'print $5'}
But because of the%, I can only receive the value as text and not numeric ... To get around this, I tried to use the command below, which returned 50.
df -h | grep VD01 | awk {'print $5'} | tr -d ‘.%‘
At first, it seemed that it worked, but when choosing numeric in Zabbix, he still does not recognize ... He says that the amount received does not match the chosen format. Do you know another way to do this check, or why is it not working correctly?
I needed to collect the value used for each partition within a deploy that does not accept agent or snmp connections. So, I thought of collecting via ssh, using a DF with some commands. At first it worked, and when I run the command below, it returns the value%, for example 50%
df -h | grep VD01 | awk {'print $5'}
But because of the%, I can only receive the value as text and not numeric ... To get around this, I tried to use the command below, which returned 50.
df -h | grep VD01 | awk {'print $5'} | tr -d ‘.%‘
At first, it seemed that it worked, but when choosing numeric in Zabbix, he still does not recognize ... He says that the amount received does not match the chosen format. Do you know another way to do this check, or why is it not working correctly?