Your code:
echo "Enter peak value"
read peak
awk '/${peak}/{c=3}c&&c--' consolelog.log > testing.txt
This does not work because strong quotes prevent the shell from performing variable expansion. This is good because awk uses a lot of syntax that weak quotes would make very difficult to use.
There are, however, ways to use environment variables within an awk script.
You can declare your own variable:
read peak
awk -vpeak="$peak" '$0 ~ peak { c=3 } c&&c--' consolelog.log > testing.txt
Or you can just tell awk to look at the one you just used read to fill:
read peak
export peak
awk '$0 ~ ENVIRON["peak"] { c=3 } c&&c--' consolelog.log > testing.txt