The 27-year-old was named test captain earlier this month after long-serving skipper Angelo Mathews stepped down following Sri Lanka's first one-day international series defeat to Zimbabwe.
The right-handed batsman then led Sri Lanka to a win in the one-off test against the same opposition.
"Chandimal was down with flu and was taken to the hospital this morning," a Sri Lanka Cricket spokesman told Reuters.
The first test against Virat Kohli-led India starts on Wednesday at Galle.
"We were actually only told late last night - the blood test came a bit late. He's got pneumonia," Asanka Gurusinha, Sri Lanka's cricket manager, was quoted as saying by ESPNcricinfo.
"He was admitted to hospital this morning at 9 AM (local time), and he's definitely out of the first test."
Sri Lanka have limited-overs captain Upul Tharanga in the side while spin spearhead Rangana Herath has also lead the side last year in the absence of Mathews.
Asanka GurusinhaDinesh ChandimalIndia vs Sri lankaIndia vs Sri Lanka 2017rangana herathsri lanka vs indiaupul tharanga
First Published: July 21, 2017, 1:53 PM IST