graph.cgi: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/share/collectd/collection3/bin/graph.cgi - from package: collectd-web

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/share/doc/collectd-core/examples/collection3/bin/graph.cgi - from package: collectd-core

You may install the required package with command apt-get install {package}
Error in other languages:
graph.cgi: bevel nie gevind nie
graph.cgi: comandă negăsită
graph.cgi: comando não encontrado
graph.cgi: commande introuvable
graph.cgi: command not found
graph.cgi: käsku ei ole
graph.cgi: không tìm thấy lệnh
graph.cgi: komanda nerasta
graph.cgi: Kommando nicht gefunden.
graph.cgi: kommandot finns inte
graph.cgi: komut yok
graph.cgi: nie znaleziono polecenia
graph.cgi: níor aimsíodh an t-ordú
graph.cgi: no se encontró la orden
graph.cgi: no s'ha trobat l'ordre
graph.cgi: opdracht niet gevonden
graph.cgi: parancs nem található
graph.cgi: perintah tidak ditemukan
graph.cgi: príkaz nenájdený
graph.cgi: příkaz nenalezen
graph.cgi: команда не найдена
graph.cgi: командата не е открита
graph.cgi: 命令找不到
graph.cgi: コマンドが見つかりません