Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
root@Zombie:/x/cacti# php script_server.php
PHP Script Server has Started - Parent is cmd
/x/cacti/scripts/ss_valute.php ss_valute get live EUR
/x/cacti/scripts/ss_dobanzi.php ss_dobanzi get valoare LIBOREUR6M
4.24
U
1.6088
U
ipts/ss_valute.php ss_valute get live EUR
4.24
U
nzi.php ss_dobanzi get valoare LIBOREUR6M
1.6088
U
mnzi.php ss_dobanzi get valoare LIBOREUR6M
1.6088
U
this should return an error nzi.php ss_dobanzi get valoare LIBOREUR6M
WARNING: Function does not exist
mnzi.php ss_dobanzi get valoare LIBOREUR6M
1.6088
U
this-should-return-an-error-too-php ss_dobanzi get valoare LIBOREUR6M
1.6088
U
OK, so what's wrong?
Latest cacti version, of course.
My problem is that values seem to get 'mixed'
Last edited by Alice on Thu Apr 23, 2009 1:53 am, edited 2 times in total.
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs
1) Have you read in the documentation site how to create scripts?
2) My psychic powers are lacking this morning, I can't picture the contents of that ss_ script...
+--------+----------+---------+---------------------------+-----------------------------+
| Valuta | bnr | live | DescriereRO | DescriereEN |
+--------+----------+---------+---------------------------+-----------------------------+
| AUD | 2.3078 | 2.3169 | Dolarul australian | Australian Dollar |
| BGN | 2.1692 | 2.1711 | Leva bulgareasca | Bulgarian Lev |
ss_dobanzi is 90% the same thing.
Anyway, I don't know if the script is the problem here, but is ok to return a value for this? this-should-return-an-error-too-php ss_dobanzi get valoare LIBOREUR6M
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs
Quite possibly. Cacti (and especially spine) can be picky about a scripts returned values. Any extra spaces, trailing characters, etc can break stuff. Why not throw that trim() onto your new script and see if it helps things? All those U's getting returned, certainly cannot be a good thing either.