Well is extend-sh with snmpd is not something you want to do ( Which for
reasons, you are not using ) you have basicly 2 things you can do
- Passive checks: Cronjob runs your smartctl, then it sends a reply to your
Icinga server with status ( issue here is machines have to be able to
communicate to your icinga server, not the pratical choice for security )
- Exposing the smartctl with xinetd on some ports. I do something similar to
check the Galera status of MariaDB servers with Haproxy. Again not great for
security, but you only have to whitelist your Icinga2 server in firewall to
access that port you expose. So your check would do a http check on the port
you chose, if status 200, means all good, 500 or else means you have issue. you
could also set a body in the page to have perfdata/status details.
example xinetd
cat /etc/xinetd.d/mysqlchk
# This file is being maintained by Puppet.
# DO NOT EDIT
service mysqlchk
{
port = 9999
disable = no
socket_type = stream
protocol = tcp
wait = no
user = nobody
group = root
groups = yes
server = /usr/local/bin/clustercheck
only_from = 0.0.0.0/0
per_source = UNLIMITED
log_on_failure += USERID
flags = REUSE
}
And a sample return in the check it self
[...]
return_ok()
{
debug_log "return_ok()"
echo -e "HTTP/1.1 200 OK\r\n"
echo -e "Content-Type: text/html\r\n"
echo -e "Content-Length: 43\r\n"
echo -e "\r\n"
echo -e "<html><body>MySQL is running.</body></html>\r\n"
echo -e "\r\n"
rm $ERR_FILE $TMP_FILE
exit 0
}
return_fail()
{
debug_log "return_fail()"
echo -e "HTTP/1.1 503 Service Unavailable\r\n"
echo -e "Content-Type: text/html\r\n"
echo -e "Content-Length: 42\r\n"
echo -e "\r\n"
echo -e "<html><body>Node *down*: ${1}.</body></html>\r\n"
sed -e 's/\n$/\r\n/' $ERR_FILE
echo -e "\r\n"
rm $ERR_FILE $TMP_FILE
exit 1
}
[...]
--
Pascal Larivée
iWeb
That's not what I asked.
I meant what scenario, not what tools.
I have icinga2 running already but i'm not monitoring remote hardware,
only remote availability via icmp or tcp port (like http, pop, etc).
I was thinking maybe somebody does this on a large enough scale and can
recommend a theoretical setup based on personal experience with setup,
maintenance, ease of configuration, scalability, automation etc.
I didn't ask about man pages or command line parameters to plugins, no
thank you, I can read those myself.
On 3/1/2017 8:43 PM, Tim H. wrote:
Looks like nagios has a few smart monitoring plugins here:
https://www.nagios.com/solutions/smart-monitoring/
They are likely available in your distributions package manager under a
name like "nagios-plugins".
On Wed, Mar 1, 2017 at 12:44 PM, Horatiu N
<[email protected]<mailto:[email protected]>
<mailto:[email protected]>> wrote:
Greetings,
I want to monitor several remote servers drives for SMART errors and
also disk usage.
On icinga2, what scenario do you recommend ?
Thank you.
_______________________________________________
icinga-users mailing list
[email protected]<mailto:[email protected]>
<mailto:[email protected]>
https://lists.icinga.org/mailman/listinfo/icinga-users
<https://lists.icinga.org/mailman/listinfo/icinga-users>
_______________________________________________
icinga-users mailing list
[email protected]<mailto:[email protected]>
https://lists.icinga.org/mailman/listinfo/icinga-users
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users