These are two different things so it's not an either or situation.
Splunk is to centralize and analyze your logs. It is capable of generating alerts so I can see how this functionality can be confused with Nagios. But Nagios is an infrastructure and services monitoring and alerting solution. It can monitor things that don't necessarily have logs like cpu usage, number of processes, even check for ssl certificates about to expire. Logs may not tell you that apache has stopped responding to http requests where Nagios can.
So in most situations you'll want to have something that does each of these jobs. For log correlation and analysis there aren't a lot of open source options but Octopussy looks pretty good. For infrastructure monitoring, alerts, and escalations there are a number of solutions out there. Both commercial and free/opensource.