You have many mistakes. See this run-anywhere fixed example:
index=_*
| eval date_hour=strftime(_time, "%H")
| eval date_hour=if(len(date_hour)==1,"0".date_hour.":00",date_hour.":00")
| eval total1=random(), total2=random()
| stats sum(total1) AS total1 sum(total2) AS total2 BY date_hour sourcetype
| eval grand_total = total1 + total2
| chart values(grand_total) OVER date_hour BY sourcetype
| transpose header_field=date_hour
Which means your fixed search should be:
index=* sourcetype=*
| eval date_hour=strftime(_time, "%H")
| eval date_hour=if(len(date_hour)==1,"0".date_hour.":00",date_hour.":00")
| rex "Total1\:\s(?<total1>[\d+]+)"
| rex "Total2\:\s(?<total2>[\d+]+)"
| stats sum(total1) AS total1 sum(total2) AS total2 BY date_hour sourcetype
| eval grand_total = total1 + total2
| chart values(grand_total) OVER date_hour BY sourcetype
| transpose header_field=date_hour
... View more