Try this. It's not pretty, but it works. sed was choking on the newlines from the output of the ifconfig command. I used tr to translate the newlines into a new character, processed with sed and used tr to translate the character back.
Let me know if it works for you.
Gary
Code:
#!/bin/sh
cat index.html | sed "s/MONKEY/`ifconfig eth0 | tr '\n' '~'` /" \
| tr '~' '\n' > index2.html